[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57065: 29.0.50; Double evaluation in `c-make-no-parens-syntax-table`
From: |
Stefan Monnier |
Subject: |
bug#57065: 29.0.50; Double evaluation in `c-make-no-parens-syntax-table` |
Date: |
Tue, 09 Aug 2022 03:53:53 -0400 |
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)
- bug#57065: 29.0.50; Double evaluation in `c-make-no-parens-syntax-table`,
Stefan Monnier <=