GNU bug report logs - #42138
26.3; Incompatibility between font-lock-add-keywords and enriched.el

Previous Next

Package: emacs;

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 #11 received at 42138 <at> debbugs.gnu.org (full text, mbox):

From: Vasilij Schneidermann <mail <at> vasilij.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 42138 <at> debbugs.gnu.org
Subject: Re: bug#42138: 26.3; Incompatibility between font-lock-add-keywords
 and enriched.el
Date: Mon, 20 Jul 2020 08:59:31 +0200
[Message part 1 (text/plain, inline)]
> 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.

Thanks for the clarification.  This doesn't really help me though, I want to
adjust my existing font-lock using code so that it detects when it would wipe
out said text properties enriched-mode set up.  It doesn't appear to be
sufficient to just check whether `font-lock-mode` is non-nil, if I do that
inside the example enriched.txt file, it's set to `t` for some reason.  Again,
what would the correct check be here?

> 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).

Hm, I've done that for non-font-lock scenarios before, but in this case I
really need font-lock's ability to search for strings and apply fontification
to them, so this isn't really an option.  Looking for other examples in the
Emacs sources I've found uses of `jit-lock-register`.
[signature.asc (application/pgp-signature, inline)]

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.