emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57065: closed (29.0.50; Double evaluation in `c-make-no-parens-synta


From: GNU bug Tracking System
Subject: bug#57065: closed (29.0.50; Double evaluation in `c-make-no-parens-syntax-table`)
Date: Thu, 25 Aug 2022 21:02:02 +0000

Your message dated Thu, 25 Aug 2022 17:00:56 -0400
with message-id <jwvedx411k8.fsf-monnier+emacs@gnu.org>
and subject line Re: bug#57065: 29.0.50; Double evaluation in 
`c-make-no-parens-syntax-table`
has caused the debbugs.gnu.org bug report #57065,
regarding 29.0.50; Double evaluation in `c-make-no-parens-syntax-table`
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
57065: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57065
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- 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 ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]