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

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

bug#44733: Nested let bindings for non-local DEFVAR_PER_BUFFER variables


From: Stefan Monnier
Subject: bug#44733: Nested let bindings for non-local DEFVAR_PER_BUFFER variables unwind wrong
Date: Thu, 19 Nov 2020 13:17:51 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> (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






reply via email to

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