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#58641: 29.0.50; cc-fonts signals void variable: font-lock-reference-face Date: Wed, 19 Oct 2022 14:13:22 -0400 Message-ID: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17549"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bug-cc-mode@gnu.org To: 58641@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 19 20:14:29 2022 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 1olDaH-0004HL-7V for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 Oct 2022 20:14:29 +0200 Original-Received: from localhost ([::1]:46734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olDaE-00068R-MJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 Oct 2022 14:14:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olDZx-00065x-Cw for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2022 14:14:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olDZq-0005hw-HH; Wed, 19 Oct 2022 14:14:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1olDZq-0000pU-6c; Wed, 19 Oct 2022 14:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-cc-mode@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Oct 2022 18:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58641 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: bug-cc-mode@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16662032233154 (code B ref -1); Wed, 19 Oct 2022 18:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Oct 2022 18:13:43 +0000 Original-Received: from localhost ([127.0.0.1]:60005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olDZX-0000oo-2U for submit@debbugs.gnu.org; Wed, 19 Oct 2022 14:13:43 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:44490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olDZT-0000od-Jv for submit@debbugs.gnu.org; Wed, 19 Oct 2022 14:13:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olDZT-0005v1-E9 for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2022 14:13:39 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13912) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olDZR-0005gp-IW for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2022 14:13:39 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 127358089B for ; Wed, 19 Oct 2022 14:13:35 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D7A97805B2 for ; Wed, 19 Oct 2022 14:13:32 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666203212; bh=AHnsNxJWoPfwcc65sAKbbhZG9r5RiK9zp2QDXBykwtk=; h=From:To:Subject:Date:From; b=eJ86cmm4Pg+I4/odyadpWapfXTNygSSP5lsxodkolLSluYh2MNn+ZQ9RyICkmvBcp EEFGFBezYt0Suf/V8ONtGYkhxajnnrHUX/tBQB6K3tYSGnLqIqe/zzI8xLOVMyd4q8 TSy2AM/2R48bmYSsKsESG6WTum8GZ2psS4CueqXpAdm18IObgpfPssknnyRn/Yomre eFTSL2K5onpeIEZ49XWQW8i0dUW7z2FvyPKH1I2RKUCn5tsHjZTWz6BW7AsoJgCs/H W3OG02dvP+R1qp+6Y2oQhA4eNwHEYVs3iUH929AcRvn0qXARYxpfa2mJBoqaY/1Fg/ 90T8eUpZfes/g== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id CD90112031F for ; Wed, 19 Oct 2022 14:13:32 -0400 (EDT) Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:245885 Archived-At: Package: Emacs Version: 29.0.50 If I start % emacs -Q --eval '(make-face `font-lock-reference-face)' -l cc-fonts I get the error: defconst: Symbol=E2=80=99s value as variable is void: font-lock-referen= ce-face Something like the patch below seems in order. Not sure if the FIXME is a confusion of mine or is a real problem. Stefan diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index aa16da70703..d8776d8322a 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -146,11 +146,14 @@ c-constant-face-name (defconst c-reference-face-name (with-no-warnings (if (and (c-face-name-p 'font-lock-reference-face) + (boundp 'font-lock-reference-face) (eq font-lock-reference-face 'font-lock-reference-face)) ;; This is considered obsolete in Emacs, but it still maps well ;; to this use. (Another reason to do this is to get unique ;; faces for the test suite.) 'font-lock-reference-face + ;; FIXME: `font-lock-reference-face' was an alias for + ;; `font-lock-constant-face', not `font-lock-label-face'. c-label-face-name))) =20 ;; This should not mapped to a face that also is used to fontify things @@ -586,7 +589,8 @@ c-fontify-recorded-types-and-refs (c-lang-const c-opt-cpp-macro-define) (c-lang-const c-nonempty-syntactic-ws) "\\(" (c-lang-const ; 1 + ncle + nsws - c-symbol-key) "\\)" + c-symbol-key) + "\\)" (concat "\\(" ; 2 + ncle + nsws + c-sym-key ;; Macro with arguments - a "function". "\\((\\)" ; 3 + ncle + nsws + c-sym-key