GNU bug report logs -
#39390
28.0.50; prettify-symbols-mode confuses display when start/end faces are different
Previous Next
Full log
Message #20 received at 39390 <at> debbugs.gnu.org (full text, mbox):
> Cc: 39390 <at> debbugs.gnu.org
> From: Raphael 'kena' Poss <knz <at> 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.
This bug report was last modified 5 years and 124 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.