From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#57065: 29.0.50; Double evaluation in `c-make-no-parens-syntax-table` Date: Sat, 27 Aug 2022 09:46:05 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27184"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57065@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 27 11:47:45 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 1oRsPp-0006wO-1Q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Aug 2022 11:47:45 +0200 Original-Received: from localhost ([::1]:42152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRsPn-000524-P3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Aug 2022 05:47:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRsP9-00051w-44 for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2022 05:47:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRsP8-0003o2-QN for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2022 05:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRsP8-0008Df-DW for bug-gnu-emacs@gnu.org; Sat, 27 Aug 2022 05:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Aug 2022 09:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57065 X-GNU-PR-Package: emacs Original-Received: via spool by 57065-submit@debbugs.gnu.org id=B57065.166159357631542 (code B ref 57065); Sat, 27 Aug 2022 09:47:02 +0000 Original-Received: (at 57065) by debbugs.gnu.org; 27 Aug 2022 09:46:16 +0000 Original-Received: from localhost ([127.0.0.1]:55220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRsON-0008Cf-To for submit@debbugs.gnu.org; Sat, 27 Aug 2022 05:46:16 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:31608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRsOL-0008CR-2j for 57065@debbugs.gnu.org; Sat, 27 Aug 2022 05:46:14 -0400 Original-Received: (qmail 55955 invoked by uid 3782); 27 Aug 2022 11:46:06 +0200 Original-Received: from acm.muc.de (p2e5d55d5.dip0.t-ipconnect.de [46.93.85.213]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 27 Aug 2022 11:46:06 +0200 Original-Received: (qmail 5926 invoked by uid 1000); 27 Aug 2022 09:46:05 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:240891 Archived-At: Hello, Stefan. Thanks for debugging and fixing this. There was another instance of the same bug in cc-langs.el, so I've fixed that in a followup commit, even though that was unlikely to cause any problems. Of course, both fixes have gone into the upstream version. Thanks again! -- Alan Mackenzie (Nuremberg, Germany). On Thu, Aug 25, 2022 at 17:00:56 -0400, Stefan Monnier wrote: > Pushed to `master`, closing, > Stefan > Stefan Monnier [2022-08-09 03:53:53] wrote: > > The patch below seems to be necessary to avoid a double-evaluation. > > This can be seen if you do something like > > (c-lang-defconst c-make-mode-syntax-table my-lang #'my-fun) > > or > > (c-lang-defconst c-make-mode-syntax-table my-lang (symbol-value 'my-fun)) > > or > > (c-lang-defconst c-make-mode-syntax-table my-lang > > (lambda () ..)) > > where you'll get errors like "void-variable `my-fun`" or "void-function > > `closure`. > > Stefan > > diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el > > index c5964165c8d..7826f38ca1a 100644 > > --- a/lisp/progmodes/cc-langs.el > > +++ b/lisp/progmodes/cc-langs.el > > @@ -403,7 +403,7 @@ c-make-no-parens-syntax-table > > t (if (c-lang-const c-recognize-<>-arglists) > > `(lambda () > > ;(if (c-lang-const c-recognize-<>-arglists) > > - (let ((table (funcall ,(c-lang-const c-make-mode-syntax-table)))) > > + (let ((table (funcall ',(c-lang-const c-make-mode-syntax-table)))) > > (modify-syntax-entry ?\( "." table) > > (modify-syntax-entry ?\) "." table) > > (modify-syntax-entry ?\[ "." table)