GNU bug report logs - #47105
defface docs

Previous Next

Package: emacs;

Reported by: Reza Nikoopour <rnikoopour <at> gmail.com>

Date: Fri, 12 Mar 2021 17:00:01 UTC

Severity: wishlist

Tags: notabug

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Reza Nikoopour <rnikoopour <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: defface docs
Date: Fri, 12 Mar 2021 08:53:18 -0800
[Message part 1 (text/plain, inline)]
Hello,

I've been reading the docs in the emacs manual about defface:

https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Faces.html

I had a question about the following two conventions

People are sometimes tempted to create a variable whose value is a face
> name. In the vast majority of cases, this is not necessary; the usual
> procedure is to define a face with defface, and then use its name directly.


You should not quote the symbol face, and it should not end in ‘-face’
> (that would be redundant).


I see both of these conventions in font-lock.el.

https://github.com/emacs-mirror/emacs/blob/master/lisp/font-lock.el#L318-L319
https://github.com/emacs-mirror/emacs/blob/master/lisp/font-lock.el#L1976-L1979

Could the docs be updated to reflect what's happening in font-lock.el?  I'd
be happy to make the contribution, but I don't know the proper way to
suggest an update to the manual.

Alternatively, could it be explained why font-lock.el doesn't follow these
conventions?

Cheers,
Reza
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 119 days ago.

Previous Next


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