From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 57065@debbugs.gnu.org
Subject: bug#57065: 29.0.50; Double evaluation in `c-make-no-parens-syntax-table`
Date: Sat, 27 Aug 2022 09:46:05 +0000 [thread overview]
Message-ID: <Ywnn3Vp2c3GmzfQn@ACM> (raw)
In-Reply-To: <jwvedx411k8.fsf-monnier+emacs@gnu.org>
Hello, Stefan.
Thanks for debugging and fixing this.
There was another instance of the same bug in cc-langs.el, so I've fixed
that in a followup commit, even though that was unlikely to cause any
problems.
Of course, both fixes have gone into the upstream version.
Thanks again!
--
Alan Mackenzie (Nuremberg, Germany).
On Thu, Aug 25, 2022 at 17:00:56 -0400, Stefan Monnier wrote:
> 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)
next prev parent reply other threads:[~2022-08-27 9:46 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
2022-08-27 9:46 ` Alan Mackenzie [this message]
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=Ywnn3Vp2c3GmzfQn@ACM \
--to=acm@muc.de \
--cc=57065@debbugs.gnu.org \
--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).