--- Begin Message ---
Subject: |
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)
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#57065: 29.0.50; Double evaluation in `c-make-no-parens-syntax-table` |
Date: |
Thu, 25 Aug 2022 17:00:56 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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)
--- End Message ---