GNU bug report logs -
#39390
28.0.50; prettify-symbols-mode confuses display when start/end faces are different
Previous Next
Full log
Message #59 received at 39390 <at> debbugs.gnu.org (full text, mbox):
Raphael 'kena' Poss <knz <at> thaumogen.net> writes:
> https://asciinema.org/a/3nOh1zCJYHOeQ4uXk0rQ9akv8
No doubt you get strange display effects in your example, but I don't
know if that can be considered a bug given that your configuration is
illegal anyway. See the docs of prettify-symbols-alist:
,----[ C-h v prettify-symbols-alist RET ]
| prettify-symbols-alist is a variable defined in ‘prog-mode.el’.
| Its value is nil
|
| Automatically becomes buffer-local when set.
|
| Documentation:
| Alist of symbol prettifications.
| Each element looks like (SYMBOL . CHARACTER), where the symbol
| matching SYMBOL (a string, not a regexp) will be shown as
| CHARACTER instead.
|
| CHARACTER can be a character, or it can be a list or vector, in
| which case it will be used to compose the new symbol as per the
| third argument of ‘compose-region’.
`----
I.e., the second element of each pair in `prettify-symbols-alist' is a
simple replacement glyph only in the case were it is a character. You
provide strings instead, so the outcome can only be determined by
checking what `compose-region' does with that input.
AFAIK, `prettify-symbols-mode's intent is to replace programming
language symbols (like "lambda" in Lisp or >>= in Haskell) with a fancy
single Unicode character each, not to replace any text with any
arbitrary other text. (Also, using multi-word matches like "setq abc"
or unbalanced expressions like "(push" is definitely asking for
trouble.)
Bye,
Tassilo
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.