GNU bug report logs -
#42138
26.3; Incompatibility between font-lock-add-keywords and enriched.el
Previous Next
Reported by: Vasilij Schneidermann <mail <at> vasilij.de>
Date: Tue, 30 Jun 2020 13:09:02 UTC
Severity: normal
Found in version 26.3
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 42138 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 30 Jun 2020 15:08:22 +0200
> From: Vasilij Schneidermann <mail <at> vasilij.de>
>
> After opening enriched.txt and running any kind of code using the
> `font-lock-add-keywords` function (for example whitespace-mode or
> hl-todo-mode), the enriched highlighting is gone. Is this a bug or
> intentional? If it's intentional, is there some way for the code using
> `font-lock-add-keywords` to detect this condition, other than checking
> for the presence of enriched-mode?
I think enriched-mode, like any other mode that puts its own faces on
chunks of text by means other than font-lock, is fundamentally
incompatible with font-lock. It's basically the same problem as if
you tried to use put-text-property in *scratch* to put some face
property on some text in the buffer: the face won't show until you
turn off font-lock. That's because the first thing font-lock does is
wipe out all the faces in the buffer.
> Alternatively, is there a recommended way to add highlighting of
> keywords that's compatible with enriched-mode?
Any way that uses put-text-property, add-text-properties, etc. without
using font-lock will do. You can even try that manually via the
facemenu-set-* commands (or via the Edit->Text Properties menu from
the menu bar).
This bug report was last modified 4 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.