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#57065: 29.0.50; Double evaluation in `c-make-no-parens-syntax-table` Date: Tue, 09 Aug 2022 03:53:53 -0400 Message-ID: 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="21922"; mail-complaints-to="usenet@ciao.gmane.io" To: 57065@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 09 09:55:27 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 1oLK5G-0005VP-Sf for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Aug 2022 09:55:27 +0200 Original-Received: from localhost ([::1]:48854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLK5F-0001Cb-SZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Aug 2022 03:55:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLK4u-0001Ay-4K for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 03:55:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52696) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLK4s-0002VM-RE for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 03:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLK4s-0000Jj-Hd for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 03:55: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: Tue, 09 Aug 2022 07:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57065 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16600316631166 (code B ref -1); Tue, 09 Aug 2022 07:55:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Aug 2022 07:54:23 +0000 Original-Received: from localhost ([127.0.0.1]:42445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLK4E-0000Ik-Hc for submit@debbugs.gnu.org; Tue, 09 Aug 2022 03:54:22 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:35616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLK4C-0000Ic-M3 for submit@debbugs.gnu.org; Tue, 09 Aug 2022 03:54:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLK49-0000pe-NQ for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 03:54:18 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:17194) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLK47-0002T3-0L for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 03:54:16 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id ADCF28076B for ; Tue, 9 Aug 2022 03:54:11 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 44807802FA for ; Tue, 9 Aug 2022 03:54:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1660031650; bh=ZJX10BQCD9BDc1Tb+Sr7+xLXpVp9NzpopFDqoTXtmFc=; h=From:To:Subject:Date:From; b=ljks/IatZZPndymkknefZ8dCTsr9QbHC13r3z/f8wLusbOP2BLZ5bwcI9pDq3mIjG Zaiq/RHupDNkMqiraCGePDbGpewQkgVK52Ux+fMyim0l1Gai+nz7zOs1h5yYtBdkPG lTxWPP4TLnwiy4Ye1NoX0+Sghel/vnEqUX7VJWXRJRRnK8/497WrCZaVG1R6/2o/Vc 1ip8pRMbQ3zXpcBol5+a1NwQRRvtwN8GOjyCGyVF7aP5AXiQhSJCWJbeRSfr2sH0Ua yHGBJbHY7/PtzZinLqMUykdecfn87KdeetOTZHwbiNGYW0ymXqzJEiHshAfobSIlnZ kHIp/vgkRot6A== Original-Received: from milanesa (dyn.144-85-182-089.dsl.vtx.ch [144.85.182.89]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BDC7412040A for ; Tue, 9 Aug 2022 03:54:09 -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, T_SCC_BODY_TEXT_LINE=-0.01 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:239138 Archived-At: Package: Emacs Version: 29.0.50 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)