emacs-devel
[Top][All Lists]
Advanced

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

Re: master 48aacbf292 2/2: Make many seldom-used generalized variables o


From: Lars Ingebrigtsen
Subject: Re: master 48aacbf292 2/2: Make many seldom-used generalized variables obsolete
Date: Mon, 19 Sep 2022 14:37:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Augusto Stoffel <arstoffel@gmail.com> writes:

> set-local just relies on set, so if the variable is let-bound, then the
> "toplevel" local value is unchanged:
>
>    (progn (setq-local x 1)
>           (let (x) (setq-local x 2))
>           x)
>    ==> 1
>
> I've had some trouble with this when a major mode (and therefore its
> mode hook) is called from a place with let-bound variables.  But then
> one could argue that working around it is even more problematic...

But that's with the dynamic binding dialect -- with lexical binding, the
setq-local ignores that binding.



reply via email to

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