From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Spencer Baugh <sbaugh@catern.com>, 44733@debbugs.gnu.org
Subject: bug#44733: Nested let bindings for non-local DEFVAR_PER_BUFFER variables unwind wrong
Date: Thu, 19 Nov 2020 13:17:51 -0500 [thread overview]
Message-ID: <jwvzh3d5i2r.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <834kllphd8.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Nov 2020 16:10:27 +0200")
>> (let ((left-margin 1))
>> ;; Set this variable "pseudo-locally", inside a SPECPDL_LET_DEFAULT binding.
>> (setq left-margin 123)
>> (assert (eq left-margin 123))
>> ;; Note, it's not a local variable.
>> (assert (not (local-variable-p 'left-margin)))
>> ;; The default value doesn't change.
>> (assert (eq (default-value 'left-margin) 1))
This is a bug, indeed. It should be 123 at this point.
>> (with-temp-buffer (assert (eq left-margin 1)))
Same here, it should be 123.
Stefan
next prev parent reply other threads:[~2020-11-19 18:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 3:11 bug#44733: Nested let bindings for non-local DEFVAR_PER_BUFFER variables unwind wrong Spencer Baugh
2020-11-19 14:10 ` Eli Zaretskii
2020-11-19 14:22 ` Spencer Baugh
2020-11-19 18:17 ` Stefan Monnier [this message]
2020-11-19 19:21 ` Spencer Baugh
2020-11-19 20:23 ` Stefan Monnier
2020-11-19 20:56 ` Spencer Baugh
2020-11-19 22:14 ` Stefan Monnier
2021-10-23 10:19 ` Stefan Kangas
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvzh3d5i2r.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=44733@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=sbaugh@catern.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.