From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#47105: defface docs Date: Fri, 12 Mar 2021 20:32:04 +0200 Message-ID: <83v99wjk9n.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33198"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47105@debbugs.gnu.org To: Reza Nikoopour Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 12 20:07:59 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKn8g-0008U6-Rx for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Mar 2021 20:07:58 +0100 Original-Received: from localhost ([::1]:58778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKn8f-00042c-Nm for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Mar 2021 14:07:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKmas-0003Fb-TF for bug-gnu-emacs@gnu.org; Fri, 12 Mar 2021 13:33:09 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKmas-0007Ql-Jw for bug-gnu-emacs@gnu.org; Fri, 12 Mar 2021 13:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lKmas-00053d-GC for bug-gnu-emacs@gnu.org; Fri, 12 Mar 2021 13:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Mar 2021 18:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47105 X-GNU-PR-Package: emacs Original-Received: via spool by 47105-submit@debbugs.gnu.org id=B47105.161557394619397 (code B ref 47105); Fri, 12 Mar 2021 18:33:02 +0000 Original-Received: (at 47105) by debbugs.gnu.org; 12 Mar 2021 18:32:26 +0000 Original-Received: from localhost ([127.0.0.1]:58337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lKma3-00052Y-QL for submit@debbugs.gnu.org; Fri, 12 Mar 2021 13:32:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lKma0-00052K-Cg for 47105@debbugs.gnu.org; Fri, 12 Mar 2021 13:32:10 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59878) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmZu-0006wj-EV; Fri, 12 Mar 2021 13:32:03 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1918 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lKmZt-0000XO-C9; Fri, 12 Mar 2021 13:32:02 -0500 In-Reply-To: (message from Reza Nikoopour on Fri, 12 Mar 2021 08:53:18 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:202185 Archived-At: > From: Reza Nikoopour > 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.