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

From: Ted Zlatanov <[email-masked]>
Date: Sun, 16 Jun 2013 05:34:50 -0400

On Sun, 16 Jun 2013 03:52:43 +0200 Juanma Barranquero <[email-masked]> wrote: 

JB> On Sun, Jun 16, 2013 at 2:07 AM, Ted Zlatanov <[email-masked]> wrote:
>> Sorry for the misunderstanding.  I read your question incorrectly.
>> Turning off font-lock in the same buffer does not remove the
>> prettification.

JB> Aha. Well, perhaps it shoud... :-)

Yes, I agree.  Maybe we can add a `prog-prettify-uninstall' function
that expects the buffer-local `prog-prettify-symbols-alist' to be
unchanged and removes all compositions named in it?  And that can be
added to the font-lock unload hook when `prog-mode' is installed?

Or should it be lower level, where font-lock mode remembers "prettify"
compositions as a text property?  That would work regardless of
`prog-prettify-symbols-alist' and would not require an unload hook.  It
would also work if we add prettification in other modes, not just
`prog-mode'.

Ted