bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14595: Erroneous composition of lambda in emacs-lisp buffers with pr


From: Ted Zlatanov
Subject: bug#14595: Erroneous composition of lambda in emacs-lisp buffers with prog-prettify-symbols enabled
Date: Sat, 15 Jun 2013 20:13:28 -0400
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (darwin)

On Sat, 15 Jun 2013 19:49:10 +0200 Juanma Barranquero <lekktu@gmail.com> wrote: 

JB> In other words, this simple patch fixes the problem:

JB> === modified file 'lisp/progmodes/prog-mode.el'
JB> --- lisp/progmodes/prog-mode.el 2013-06-06 21:32:13 +0000
JB> +++ lisp/progmodes/prog-mode.el 2013-06-15 17:47:50 +0000
JB> @@ -77,7 +77,7 @@
JB>         '(?w) '(?. ?\\))))
JB>      (if (or (memq (char-syntax (or (char-before start) ?\ )) syntaxes)
JB>      (memq (char-syntax (or (char-after end) ?\ )) syntaxes)
JB> -            (nth 8 (syntax-ppss)))
JB> +            (nth 8 (save-match-data (syntax-ppss))))
JB>   ;; No composition for you.  Let's actually remove any composition
JB>   ;; we may have added earlier and which is now incorrect.
JB>   (remove-text-properties start end '(composition))

Nice catch.

JB> but, it would still be nice to know why syntax-ppss destroys
JB> (match-data 0) in some lines and not all of them.

I took this code out of `perl-mode' but didn't write it.  I hope someone
else can answer.

Ted






reply via email to

[Prev in Thread] Current Thread [Next in Thread]