GNU bug report logs - #39390
28.0.50; prettify-symbols-mode confuses display when start/end faces are different

Previous Next

Package: emacs;

Reported by: Raphael 'kena' Poss <knz <at> thaumogen.net>

Date: Sun, 2 Feb 2020 15:44:01 UTC

Severity: normal

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Raphael 'kena' Poss <knz <at> thaumogen.net>
Cc: 39390 <at> debbugs.gnu.org
Subject: bug#39390: 28.0.50; prettify-symbols-mode confuses display when start/end faces are different
Date: Mon, 03 Feb 2020 17:50:27 +0200
> Cc: 39390 <at> debbugs.gnu.org
> From: Raphael 'kena' Poss <knz <at> thaumogen.net>
> Date: Sun, 2 Feb 2020 21:26:32 +0100
> 
> (font-lock-add-keywords
>  'go-mode
>  '(("func(" . font-lock-keyword-face)))
> 
> (add-hook
>  'go-mode-hook
>  (lambda ()
>    (push '("func(" . "λ(") prettify-symbols-alist)))
> 
> I have checked manually (by first disabling my prettify-symbols-alist
> customization) that the font-lock customization indeed applies the same
> face to all occurences of "func(" in the source.
> 
> However once the prettify-symbols substitution is active, the display
> becomes messed up again.
> 
> Is it possible that this occurs because go-mode already pre-defines a
> rule to apply keyword-face to "func", before my additional rule kicks
> in? Do you reckon there is a way to remove the native rule defined by
> go-mode so that mine remains the only that parses "func"?

Sorry, I don't know.

Would it be possible for you to prepare a reproducing recipe, starting
from "emacs -Q", and loading the minimum number of packages/features
required to show the problem?  Then I'll try to look at what happens
in the display code.

In general, static character composition used by prettify-symbols is a
deprecated feature, which doesn't fully support the current Emacs
display capabilities, so I'm not surprised there are problems when it
is used in "creative" ways.  But maybe there's an easy solution, who
knows.

Thanks.




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.