GNU bug report logs - #71469
font-lock does not apply standard faces and their descendants

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>

Date: Mon, 10 Jun 2024 12:33:02 UTC

Severity: normal

Fixed in version 31.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 71469 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 71469 <at> debbugs.gnu.org
Subject: Re: [PATCH] Re: bug#71469: font-lock does not apply standard faces and
 their descendants
Date: Mon, 10 Jun 2024 18:17:02 +0300
> From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> Cc: 71469 <at> debbugs.gnu.org
> Date: Mon, 10 Jun 2024 16:41:53 +0300
> 
> I'm wondering if it would be okay to mention such nuance in the
> "standard faces" documentation, such as with the attached patch? I
> think it would be really helpful, because the nuance of how it works is
> not obvious at all (it would be much easier if none of the faces such
> as font-lock-keyword-face, would be defining a variable). I've spent
> for about an hour on this trying in different ways to make it work, and
> I also think it wasn't the first time I stumbled upon this. Having the
> "standard faces" mention that interaction nuance I think could be
> helpful for people in the future.
> 
> 
> From 02811b6400259c0d9b2dedcca76fec771dcd839a Mon Sep 17 00:00:00 2001
> From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> Date: Mon, 10 Jun 2024 16:34:30 +0300
> Subject: [PATCH] Mention interaction of standard faces with font-lock-keywords
> 
> * doc/emacs/display.texi (standard faces): mention that these faces do
> not produce variables and so can't be passed to font-lock-keywords as
> is.
> ---
>  doc/emacs/display.texi | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
> index 8f22e3c88da..bcbe68d21ea 100644
> --- a/doc/emacs/display.texi
> +++ b/doc/emacs/display.texi
> @@ -647,7 +647,9 @@ Standard Faces
>  @cindex standard faces
>  
>    Here are the standard faces for specifying text appearance.  You can
> -apply them to specific text when you want the effects they produce.
> +apply them to specific text when you want the effects they produce. Note
> +that these faces do not define variables, so to pass such face to
> +@code{font-lock-keywords} you have to quote it.

I don't think I agree with this addition, so I added Stefan to this
discussion.

Stefan, any comments?




This bug report was last modified 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.