GNU bug report logs -
#14595
Erroneous composition of lambda in emacs-lisp buffers with prog-prettify-symbols enabled
Previous Next
Reported by: Juanma Barranquero <lekktu <at> gmail.com>
Date: Wed, 12 Jun 2013 03:21:02 UTC
Severity: normal
Found in version 24.3.50
Done: Juanma Barranquero <lekktu <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 14595 <at> debbugs.gnu.org (full text, mbox):
On Sat, Jun 15, 2013 at 11:12 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> The incorrect display happens when the underlined part below
>
> (compose-region start end (cdr (assoc (match-string 0) alist)))))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> is nil. When that happens, (match-string 0) is "(", the left
> parenthesis, not the expected "lambda".
The call to syntax-ppss inside prog--prettify-font-lock-compose-symbol
is altering the match-string data. I saved (match-string 0) in the
let* as ms0, and then for the erroneous lines I get this log:
start = 2507 / end = 2513 / (match-string 0) = #("(" 0 1 (fontified
t)) / ms0 = #("lambda" 0 6 (fontified t)) / alist = (("lambda" . 955))
so it was correct when the function was called. Then I wrapped the
syntax-ppss call inside save-match-data and the bug disappears.
> I hope fontification gurus will be able to tell us why this could
> happen.
Yep.
This bug report was last modified 12 years and 36 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.