Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make imenu-sort-function as local variable in terraform-mode #65

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

buzztaiki
Copy link

@buzztaiki buzztaiki commented Jul 16, 2023

Since imenu-sort-function is not a buffer-local variable, we need to explicitly make it local.

Comment on lines 357 to 358
(make-local-variable 'imenu-sort-function)
(setq imenu-sort-function 'imenu--sort-by-name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With buffer local variables it's better to use the idiom

 (set (make-local-variable 'VARIABLE) VALUE-EXP)

for setting the value in the init.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Fuco1 Thank you for your review! It fixes in 7cae810

@buzztaiki buzztaiki requested a review from Fuco1 September 12, 2023 04:16
@rnikoopour
Copy link
Contributor

Is this PR still valid? @Fuco1 can you review your changes requested or should we dismiss your requested changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants