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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47105 in the body.
You can then email your comments to 47105 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#47105; Package emacs. (Fri, 12 Mar 2021 17:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Reza Nikoopour <rnikoopour <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 12 Mar 2021 17:00:02 GMT) Full text and rfc822 format available.

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

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47105; Package emacs. (Fri, 12 Mar 2021 18:09:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Reza Nikoopour <rnikoopour <at> gmail.com>
Cc: 47105 <at> debbugs.gnu.org
Subject: Re: bug#47105: defface docs
Date: Fri, 12 Mar 2021 19:08:18 +0100
Reza Nikoopour <rnikoopour <at> gmail.com> writes:

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

Much of font-lock.el was written before the conventions were in place,
and it hasn't been converted to use them because that would be too
disruptive.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47105; Package emacs. (Fri, 12 Mar 2021 18:33:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Reza Nikoopour <rnikoopour <at> gmail.com>
Cc: 47105 <at> debbugs.gnu.org
Subject: Re: bug#47105: defface docs
Date: Fri, 12 Mar 2021 20:32:04 +0200
> From: Reza Nikoopour <rnikoopour <at> gmail.com>
> Date: Fri, 12 Mar 2021 08:53:18 -0800
> 
>  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?

It's the case of "do as I say, not as I do".  We cannot always follow
our own recommendations for some historical reasons.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47105; Package emacs. (Thu, 18 Mar 2021 07:08:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 47105 <at> debbugs.gnu.org, Reza Nikoopour <rnikoopour <at> gmail.com>
Subject: Re: bug#47105: defface docs
Date: Thu, 18 Mar 2021 08:07:33 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> It's the case of "do as I say, not as I do".  We cannot always follow
> our own recommendations for some historical reasons.

So I don't think there's anything to fix here, and I'm closing this bug
report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) notabug. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 18 Mar 2021 07:08:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 47105 <at> debbugs.gnu.org and Reza Nikoopour <rnikoopour <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 18 Mar 2021 07:08:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 15 Apr 2021 11:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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