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

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

bug#39390: 28.0.50; prettify-symbols-mode confuses display when start/en


From: Eli Zaretskii
Subject: bug#39390: 28.0.50; prettify-symbols-mode confuses display when start/end faces are different
Date: Sun, 02 Feb 2020 21:20:41 +0200

> Cc: 39390@debbugs.gnu.org
> From: Raphael 'kena' Poss <knz@thaumogen.net>
> Date: Sun, 2 Feb 2020 19:28:24 +0100
> 
> Is there a way to tweak either the configuration
> (prettify-symbols-alist) or prog-mode.el to trick it into emitting the
> same face for the substitution?

It sounds like there's a misunderstanding.  prettify-symbols-mode
doesn't emit any faces, it "composes" several characters into one or
more symbols.  The composition process needs that all of the
characters to be composed have the same face.  That face is put on the
characters by font-lock mode, not by prettify-symbols-mode.  That is
why I suggested to amend the font-lock definitions for the major
mode(s) you are using.  Without all the characters to be replaced
having the same font-lock face, you will not be able to "convince"
prettify-symbols-mode to replace them, because the underlying
mechanism that examines the characters to be composed stops when the
face property changes.

> (My opinion is that this bug exists in prog-mode.el and thus a
> workaround/fix should be provided at that level, not in a per-mode or
> per-user customization.)

It isn't a bug, it is a fundamental limitation of the method used by
prettify-symbols-mode to replace text with symbols.





reply via email to

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