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

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

bug#65209: 30.0.50; Unexpected behaviour of setq-local


From: Eli Zaretskii
Subject: bug#65209: 30.0.50; Unexpected behaviour of setq-local
Date: Thu, 10 Aug 2023 17:00:18 +0300

> Date: Thu, 10 Aug 2023 15:50:26 +0200
> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> 
> Evaluate the following
> 
> (progn
>    (defvar my-var :default-value)
>    (make-variable-buffer-local 'my-var)
>    (let ((my-var :let-value))
>      (setq-local my-var :buffer-local-new))
>    my-var)
> => :default-value
> 
> (progn
>    (defvar my-var1 :default-value)
>    (make-variable-buffer-local 'my-var1)
>    (setq my-var1 :buffer-local)
>    (let ((my-var1 :let-value))
>      (setq-local my-var1 :buffer-local-new))
>    my-var1)
> => :buffer-local
> 
> In both cases, setq-local has no effect.
> 
> (I stumbled over this because lexical-binding is set to nil in *scratch*
> when using persistent-scratch (MELPA).  It's quite convolutetd, but in
> short: Custom loads persistent-scratch, which loads the contents of
> *scratch*, and calls lisp-interaction-mode.  Lisp-interaction-mode
> setq-local's lexical-binding to t, but this doesn't work because all
> this happens during an eval-buffer that has a specbind of
> lexical-binding to nil.)

Adding Stefan.





reply via email to

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