Quoting David Kastrup (d...@gnu.org): > pls <p...@philomelos.net> writes: > > lilypond-mode (Git-repository) and electric-indent-mode don't seem to > > get along too well > > in Emacs. (I'm currently using GNU Emacs 25.0.50.2 (x86_64-pc-linux-gnu, > > GTK+ Version 3.10.8) but I have experienced the same issues with all > > other Emacs-versions I have tried before.) > > > > When I press RET at the end of a line the indentation of that line gets > > messed up (only in lilypond-mode). I tried the following three > > solutions to turn off > > electric-indent-mode in lilypond-mode in my .emacs file but none of them > > seems to work: > > [snip] > > > > I finally turned it off globally (setq-default electric-indent-mode nil) > > but that's not really my favorite solution. Has anyone else experienced > > similar problems (and solved them) or is the problem sitting right in > > front of my computer?
> The indentation engine of lilypond-mode needs to be redone. One of its > most annoying properties is that it's not benign: if it gets out of > whack, having one correctly indented < or { or << or >> or } or > will > not let it resynchronize. > > LilyPond-mode has not changed significantly since version 2.0 or so. > It's just no longer in touch, and it does not deal gracefully with > embedding blocks of Scheme inside of regular LilyPond code. I try to keep my scheme in included files containing not much else. (That's easy for me as most of it is snippets I have garnered here and elsewhere.) But one thing I do keep handy is a single key defined to <press TAB> and <move forward one line>. That way, I can move to the top of the file and just hold down that key to tidy up the whole file. Way back when spontaneous "narrowing" used to happen to me, I would do this quite often. Whether it had any real effect, I don't know. It might just have been cargo cult science. Cheers, David. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user