0

I have a definitions.ly file that ends with the following:

%%% Local Variables:
%%% LilyPond-master-file: "score.ly"
%%% End:

However, the value of LilyPond-master-file is still nil when I visit the file.

If I do M-: RET (inibit-local-variables-p) RET I get nil.

If I save the exact same file with a different extension (eg. .foo), emacs asks me (upon loading) if I want to set the unsafe variable, as expected.

I've tried using a directory-local variable, but it doesn't work either.

I've tried setting another variable, like fill-column, using the snippet above, in the same file, without success.

Maybe there's something in lilypond-mode preventing the parsing of local variables?

I'm out of ideas and I don't know how to debug this...

1 Answer 1

1

I can reproduce this and it's probably a bug, but lilypond-mode.el (at least my version of it) is very old and has not seen much updating. Not even sure where to report the bug.

As a workaround however, you can do it in the mode hook:

(defun ndk/lilypond-mode-prep ()
   (hack-local-variables)
   ;; maybe other stuff
   )

(add-to-hook 'LilyPond-mode-hook #'ndk/lilypond-mode-prep)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.