GNU bug report logs -
#65742
30.0.50; default-toplevel-value and forwarded symbols
Previous Next
Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Date: Mon, 4 Sep 2023 19:04:02 UTC
Severity: normal
Found in version 30.0.50
Fixed in version 30.1
Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 65742 in the body.
You can then email your comments to 65742 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65742
; Package
emacs
.
(Mon, 04 Sep 2023 19:04:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gerd Möllmann <gerd.moellmann <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 04 Sep 2023 19:04:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Function default-toplevel-value does not take let-bindings for forwarded
symbols into account.
(progn
(defvar my-var nil)
(setq my-var t)
(let ((my-var :let))
(default-toplevel-value 'my-var)))
=> t
(progn
(setq lexical-binding t)
(let ((lexical-binding :let))
(default-toplevel-value 'lexical-binding)))
=> nil
[0001-default-toplevel-value-nor-working-for-forwarded-sym.patch (text/x-patch, inline)]
From d6cd84bcd1bb86d32d49e660d4041f655bf295f1 Mon Sep 17 00:00:00 2001
From: Gerd Moellmann <gerd.moellmann <at> gmail.com>
Date: Mon, 4 Sep 2023 20:48:28 +0200
Subject: [PATCH] default-toplevel-value nor working for forwarded syms
* src/eval.c (default_toplevel_binding): Handle SPECPDL_LET_LOCAL.
---
src/eval.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/eval.c b/src/eval.c
index 9268b65aa85..59055a75782 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -664,6 +664,7 @@ default_toplevel_binding (Lisp_Object symbol)
{
switch ((--pdl)->kind)
{
+ case SPECPDL_LET_LOCAL:
case SPECPDL_LET_DEFAULT:
case SPECPDL_LET:
if (EQ (specpdl_symbol (pdl), symbol))
--
2.42.0
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65742
; Package
emacs
.
(Mon, 04 Sep 2023 19:19:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 65742 <at> debbugs.gnu.org (full text, mbox):
> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
> Date: Mon, 04 Sep 2023 21:02:59 +0200
>
> Function default-toplevel-value does not take let-bindings for forwarded
> symbols into account.
>
> (progn
> (defvar my-var nil)
> (setq my-var t)
> (let ((my-var :let))
> (default-toplevel-value 'my-var)))
> => t
>
> (progn
> (setq lexical-binding t)
> (let ((lexical-binding :let))
> (default-toplevel-value 'lexical-binding)))
> => nil
>
> >From d6cd84bcd1bb86d32d49e660d4041f655bf295f1 Mon Sep 17 00:00:00 2001
> From: Gerd Moellmann <gerd.moellmann <at> gmail.com>
> Date: Mon, 4 Sep 2023 20:48:28 +0200
> Subject: [PATCH] default-toplevel-value nor working for forwarded syms
>
> * src/eval.c (default_toplevel_binding): Handle SPECPDL_LET_LOCAL.
> ---
> src/eval.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/eval.c b/src/eval.c
> index 9268b65aa85..59055a75782 100644
> --- a/src/eval.c
> +++ b/src/eval.c
> @@ -664,6 +664,7 @@ default_toplevel_binding (Lisp_Object symbol)
> {
> switch ((--pdl)->kind)
> {
> + case SPECPDL_LET_LOCAL:
> case SPECPDL_LET_DEFAULT:
> case SPECPDL_LET:
> if (EQ (specpdl_symbol (pdl), symbol))
> --
> 2.42.0
Adding Stefan.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65742
; Package
emacs
.
(Mon, 04 Sep 2023 19:25:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 65742 <at> debbugs.gnu.org (full text, mbox):
> Function default-toplevel-value does not take let-bindings for forwarded
> symbols into account.
>
> (progn
> (defvar my-var nil)
> (setq my-var t)
> (let ((my-var :let))
> (default-toplevel-value 'my-var)))
> => t
>
> (progn
> (setq lexical-binding t)
> (let ((lexical-binding :let))
> (default-toplevel-value 'lexical-binding)))
> => nil
Looks right to me: `lexical-binding` is set buffer-locally by the
`setq`, so the global/toplevel value is not affected.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#65742
; Package
emacs
.
(Mon, 04 Sep 2023 19:56:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 65742 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> Function default-toplevel-value does not take let-bindings for forwarded
>> symbols into account.
>>
>> (progn
>> (defvar my-var nil)
>> (setq my-var t)
>> (let ((my-var :let))
>> (default-toplevel-value 'my-var)))
>> => t
>>
>> (progn
>> (setq lexical-binding t)
>> (let ((lexical-binding :let))
>> (default-toplevel-value 'lexical-binding)))
>> => nil
>
> Looks right to me: `lexical-binding` is set buffer-locally by the
> `setq`, so the global/toplevel value is not affected.
Right, I forgot the setq. How embarrasing. Closing.
bug marked as fixed in version 30.1, send any further explanations to
65742 <at> debbugs.gnu.org and Gerd Möllmann <gerd.moellmann <at> gmail.com>
Request was from
Gerd Möllmann <gerd.moellmann <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Mon, 04 Sep 2023 19:56:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 03 Oct 2023 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 258 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.