On Thu, Oct 15, 2015 at 8:03 AM, T. Michael Sommers <tmsomme...@gmail.com> wrote:
> On 10/15/2015 7:24 AM, Andrew Bernard wrote: > >> >> I’m aware that the emacs lilypond-mode needs attention, but I wonder >> if anybody has seen this. When I enter a ‘>’ character to complete a >> chord, emacs goes into narrow mode, which then has to be undone with >> C-x n w. It’s consistently reproducible. >> > > The culprit would seem to be this, starting at line 502 in the function > LilyPond-blink-matching-paren in lilypond-indent.el: > > (when blink-matching-paren-distance > (narrow-to-region > (max (point-min) (- (point) blink-matching-paren-distance)) > (min (point-max) (+ (point) blink-matching-paren-distance)))) > > This narrowing is never undone. > Agreed, and the canonical way to solve this is by adding a "(save-restriction ..." block around this section. Something like this (untested): (when blink-matching-paren-distance > (save-restriction (narrow-to-region > (max (point-min) (- (point) blink-matching-paren-distance)) > (min (point-max) (+ (point) blink-matching-paren-distance))))) > > One solution might be to simply comment out this code, but I don't know if > that might have some undesirable side effects. > > Another solution might be to put a (widen) just before the function > returns. I think a widen on an un-narrowed buffer has no effect. > > I haven't tried either of these, so proceed at your own risk. > > -- > T.M. Sommers -- tmsomme...@gmail.com -- ab2sb > > > _______________________________________________ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user >
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user