Subject: bug#14574: prog-prettify-symbols breaks font-locking

From: Eli Zaretskii <[email-masked]>
Date: Sat, 15 Jun 2013 11:54:51 +0300

> From: Ted Zlatanov <[email-masked]>
> Date: Sat, 15 Jun 2013 04:23:34 -0400
> 
> On Tue, 11 Jun 2013 23:50:18 +0200 Juanma Barranquero <[email-masked]> wrote: 
> 
> JB> On Tue, Jun 11, 2013 at 11:35 PM, Ted Zlatanov <[email-masked]> wrote:
> >> Weird.  I don't know what's happening, and it works well for me.  Does
> >> turning `font-lock-mode' off and back on fix it?
> 
> JB> No.
> 
> JB> BTW, shouldn't turning font-lock-mode off disable the pretiffication?
> 
> They are entirely implemented by font-lock keywords, so I would assume so.
> 
> At least for me, that works every time.

>From Juanma's data, it is clear that the composition list is sometimes
created incorrectly, to include the list of all the characters in
"lambda".  The way to debug this is to catch the circumstances when
this happens.  One possible way of doing that (a.k.a. "printf
debugging") is to instrument prog--prettify-font-lock-compose-symbol
so that it logs a message with values of important variables when
the composition is incorrect, i.e. when the rule is (?l ?a ?m ?b ?d ?a).
That should give enough hints to find the villain.