unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: 57065-done@debbugs.gnu.org
Subject: bug#57065: 29.0.50; Double evaluation in `c-make-no-parens-syntax-table`
Date: Thu, 25 Aug 2022 17:00:56 -0400	[thread overview]
Message-ID: <jwvedx411k8.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <jwvzggdhmy6.fsf@iro.umontreal.ca> (Stefan Monnier's message of "Tue, 09 Aug 2022 03:53:53 -0400")

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)






  parent reply	other threads:[~2022-08-25 21:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvedx411k8.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=57065-done@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).