From unknown Thu Aug 21 12:10:21 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#58641 <58641@debbugs.gnu.org> To: bug#58641 <58641@debbugs.gnu.org> Subject: Status: 29.0.50; cc-fonts signals void variable: font-lock-reference-face Reply-To: bug#58641 <58641@debbugs.gnu.org> Date: Thu, 21 Aug 2025 19:10:21 +0000 retitle 58641 29.0.50; cc-fonts signals void variable: font-lock-reference-= face reassign 58641 emacs submitter 58641 Stefan Monnier severity 58641 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 19 14:13:43 2022 Received: (at submit) by debbugs.gnu.org; 19 Oct 2022 18:13:43 +0000 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 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 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 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 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) 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== 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) From: Stefan Monnier To: bug-gnu-emacs@gnu.org Subject: 29.0.50; cc-fonts signals void variable: font-lock-reference-face X-Debbugs-Cc: bug-cc-mode@gnu.org Date: Wed, 19 Oct 2022 14:13:22 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.176 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: 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-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 25 06:09:26 2022 Received: (at 58641) by debbugs.gnu.org; 25 Oct 2022 10:09:26 +0000 Received: from localhost ([127.0.0.1]:50463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onGs9-000627-QH for submit@debbugs.gnu.org; Tue, 25 Oct 2022 06:09:26 -0400 Received: from mx3.muc.de ([193.149.48.5]:21179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onGs4-00061o-R5 for 58641@debbugs.gnu.org; Tue, 25 Oct 2022 06:09:24 -0400 Received: (qmail 18174 invoked by uid 3782); 25 Oct 2022 12:09:13 +0200 Received: from acm.muc.de (p4fe15bed.dip0.t-ipconnect.de [79.225.91.237]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 25 Oct 2022 12:09:13 +0200 Received: (qmail 5360 invoked by uid 1000); 25 Oct 2022 10:09:12 -0000 Date: Tue, 25 Oct 2022 10:09:12 +0000 To: Stefan Monnier Subject: Re: bug#58641: 29.0.50; cc-fonts signals void variable: font-lock-reference-face Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58641 Cc: bug-cc-mode@gnu.org, 58641@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Stefan. Sorry it's taken me so long to getting around to answering. The last few days have been a bit busy. On Wed, Oct 19, 2022 at 14:13:22 -0400, Stefan Monnier via CC-Mode-help wrote: > 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’s value as variable is void: font-lock-reference-face > Something like the patch below seems in order. GRRRR! Yes, it is in order. A small point, perhaps, but we aim for perfection in CC Mode. ;-) I'll commit this, after checking that the same thing doesn't happen anywhere else in cc-fonts.el. Actually, it does, so I'll correct those other things, too. > Not sure if the FIXME is a confusion of mine or is a real problem. The aliasing of missing faces is a mass of confusion, which takes up more mental energy than it deserves. But yes, it would be better for f-l-reference-face to be mapped to f-l-constant-face before defaulting to c-label-face-name. I'll do this, too. > 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))) > ;; 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 -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 25 08:51:50 2022 Received: (at 58641) by debbugs.gnu.org; 25 Oct 2022 12:51:50 +0000 Received: from localhost ([127.0.0.1]:50654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onJPJ-0006K2-P0 for submit@debbugs.gnu.org; Tue, 25 Oct 2022 08:51:50 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onJPI-0006Jo-50 for 58641@debbugs.gnu.org; Tue, 25 Oct 2022 08:51:48 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 622004417B1; Tue, 25 Oct 2022 08:51:42 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0A8374417AF; Tue, 25 Oct 2022 08:51:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666702301; bh=+Xcp8/RC62J5hGktPYP4yJL7cwxF+0P1gfb+BHh8ZLg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=JUaQ30DFmvRknJoG5wVxQ9dzJNds7l5FWirNwxk2leYnWdd2vVdB2ZCEitrspnJ69 owOjvJ8Am2kJ52zX9d/G1lmcwchHBwUp9uDn3FxW3R+wg7csIRI3DBYTzcnFCOzyDP s9mILsXMJrTAPdhE6XCbjlmhpah00FdVIrYZ7iPofp0c+btgOXsdp040nW0ZXnywKf ziTK5ZrcleyxN1XDlvHqQIl8lJbqSyhqbEMWcA0YDJEkja5gflJmCl4PKOf0q21xAE H7xbE6KXM94Dxmu9IluzLEyqmefeZamImIDdcBj8wGtb24sfzkAfQ4C+vi6zzwzfFP 85Q8Z02piZYhQ== Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id AF5821205E5; Tue, 25 Oct 2022 08:51:40 -0400 (EDT) From: Stefan Monnier To: Alan Mackenzie Subject: Re: bug#58641: 29.0.50; cc-fonts signals void variable: font-lock-reference-face In-Reply-To: (Alan Mackenzie's message of "Tue, 25 Oct 2022 10:09:12 +0000") Message-ID: References: Date: Tue, 25 Oct 2022 08:51:39 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.318 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58641 Cc: bug-cc-mode@gnu.org, 58641@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Alan, >> 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-refe= rence-face > >> Something like the patch below seems in order. > > GRRRR! Yes, it is in order. A small point, perhaps, but we aim for > perfection in CC Mode. ;-) For the record, I bumped into the above because apparently one of the many packages I have installed defines `font-lock-reference-face` (probably some very old code that should be removed as well, but I haven't tracked it down yet). Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 25 09:43:30 2022 Received: (at 58641-done) by debbugs.gnu.org; 25 Oct 2022 13:43:30 +0000 Received: from localhost ([127.0.0.1]:50739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onKDJ-0001S3-NW for submit@debbugs.gnu.org; Tue, 25 Oct 2022 09:43:29 -0400 Received: from mx3.muc.de ([193.149.48.5]:27337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onKDH-0001Ro-WA for 58641-done@debbugs.gnu.org; Tue, 25 Oct 2022 09:43:28 -0400 Received: (qmail 378 invoked by uid 3782); 25 Oct 2022 15:43:21 +0200 Received: from acm.muc.de (p4fe15bed.dip0.t-ipconnect.de [79.225.91.237]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 25 Oct 2022 15:43:21 +0200 Received: (qmail 21825 invoked by uid 1000); 25 Oct 2022 13:43:21 -0000 Date: Tue, 25 Oct 2022 13:43:21 +0000 To: Stefan Monnier Subject: Re: bug#58641: 29.0.50; cc-fonts signals void variable: font-lock-reference-face Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58641-done Cc: bug-cc-mode@gnu.org, 58641-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Stefan. On Tue, Oct 25, 2022 at 08:51:39 -0400, Stefan Monnier wrote: > Hi Alan, > >> If I start > >> % emacs -Q --eval '(make-face `font-lock-reference-face)' -l cc-fonts > >> I get the error: > >> defconst: Symbol’s value as variable is void: font-lock-reference-face > >> Something like the patch below seems in order. > > GRRRR! Yes, it is in order. A small point, perhaps, but we aim for > > perfection in CC Mode. ;-) > For the record, I bumped into the above because apparently one of the > many packages I have installed defines `font-lock-reference-face` > (probably some very old code that should be removed as well, but > I haven't tracked it down yet). Ah, so that was it. I've just committed a patch, and I'm closing the bug with this post. I didn't actually comment your comment about font-lock-constant-face, I amended the code instead. > Stefan -- Alan Mackenzie (Nuremberg, Germany). From unknown Thu Aug 21 12:10:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 23 Nov 2022 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator