From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#71469: [PATCH] Re: bug#71469: font-lock does not apply standard faces and their descendants Date: Mon, 10 Jun 2024 13:26:19 -0400 Message-ID: References: <86tti17y8y.fsf@gnu.org> <519d35a7717587222c5da915a9e02ccaa06e9c5b.camel@yandex.ru> <86plso96a9.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13388"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 71469@debbugs.gnu.org, Konstantin Kharlamov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 10 19:34:04 2024 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 1sGiuB-0003Gm-2o for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Jun 2024 19:34:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGitx-0006Qn-0v; Mon, 10 Jun 2024 13:33:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGitt-0006QN-Ip for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 13:33:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sGitt-0005KY-BM for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 13:33:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sGiuA-00026q-Bj for bug-gnu-emacs@gnu.org; Mon, 10 Jun 2024 13:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Jun 2024 17:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71469 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 71469-submit@debbugs.gnu.org id=B71469.17180408318082 (code B ref 71469); Mon, 10 Jun 2024 17:34:02 +0000 Original-Received: (at 71469) by debbugs.gnu.org; 10 Jun 2024 17:33:51 +0000 Original-Received: from localhost ([127.0.0.1]:48577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGitz-00026H-Cr for submit@debbugs.gnu.org; Mon, 10 Jun 2024 13:33:51 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sGitw-00025y-Ud for 71469@debbugs.gnu.org; Mon, 10 Jun 2024 13:33:49 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 39128808F6; Mon, 10 Jun 2024 13:26:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1718040381; bh=Qo/hvvySCkIwXLmexLT49OrybBeqGqdLDp+r9naE3nc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=iTIXbjefr2RY484x7vcQ1xVJbvPZNTI/5vO59+0ftzeNW+GIi8SzDTbq1A2TioZJx 7zCthQWJytWbLa9Vp15WVk0NGowYLUwv0MlKgjfMTgEisJ7HDFWSPKAf2PbSR52UGV ti0DDRGTehTTGllPNauiD5hU94SNNwpXHCHU0WpSYnjnREBAwbccI+IHqPvIGJz2TA OV2uFjQqXEbl62mP0BtzcPJg7ZuLzMafUMFpdbI0addv/b+GBPAwHRbRKeDaQ4SMZk sKuH0wsj6D6rTJqqInl8Zu+QCQ7oIaTW5rRMPzVy2szvfempg7QAPsELrIe9+LogY5 21zP4NhtasogQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1C7CA8062B; Mon, 10 Jun 2024 13:26:21 -0400 (EDT) Original-Received: from pastel (unknown [24.140.236.196]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E675612024D; Mon, 10 Jun 2024 13:26:20 -0400 (EDT) In-Reply-To: <86plso96a9.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 10 Jun 2024 18:17:02 +0300") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287059 Archived-At: >> 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). No face defines a variable. Some faces (mostly font-lock faces) have an associated variable whose content is "the face name" (which is also the variable's name), but it's not a result of the face itself. It's a separate explicit definition of a variable with the same name as the face. And I agree that it would be simpler if we didn't have those, but they've been with us since `font-lock.el` in Emacs-19, so it's not easy to get rid of them. >> 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. You *always* need to quote the face name. Otherwise you're not referring to the face but to a variable of the same name (and ideally we'd want to get rid of the cases where this happens to work, because the only upside is to save you from typing a quote character, while the downside is to encourage confusion). Stefan