unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57065: 29.0.50; Double evaluation in `c-make-no-parens-syntax-table`
@ 2022-08-09  7:53 Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-09 18:29 ` Lars Ingebrigtsen
  2022-08-25 21:00 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-09  7:53 UTC (permalink / raw)
  To: 57065

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)






^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-27 15:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-09  7:53 bug#57065: 29.0.50; Double evaluation in `c-make-no-parens-syntax-table` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-09 18:29 ` Lars Ingebrigtsen
2022-08-25 21:00 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-27  9:46   ` Alan Mackenzie
2022-08-27 15:11     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).