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

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

bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large nu


From: Gerd Möllmann
Subject: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers
Date: Tue, 02 Jan 2024 12:57:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@posteo.net> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>>>> (defvar-local let-tests-buffer-local-var 'value)
>>>>> (with-temp-buffer
>>>>>   (setq-local let-tests-buffer-local-var 'baz)
>>>>>   (let ((let-tests-buffer-local-var 'bar))
>>>>>     ;; This is failing.
>>>>>     (should (eq 'bar (default-value 'let-tests-buffer-local-var)))
>>> ...
>>> Are you saying that `let' never changes `default-value' output?
>>> Unfortunately, no.
>>
>> Indeed, see the doc that Eli quoted 10 posts "ago":
>>
>>     [...] ELisp manual, which describes the effect of
>>     make-variable-buffer-local:
>>
>>         A peculiar wrinkle of this feature is that binding the variable
>>         (with ‘let’ or other binding constructs) does not create
>>         a buffer-local binding for it.  Only setting the variable (with
>>         ‘set’ or ‘setq’), while the variable does not have a ‘let’-style
>>         binding that was made in the current buffer, does so.
>>
>> IOW, `let` changes the binding that is "current": if the variable is
>> buffer-local in the current buffer it changes that buffer-local value
>> and otherwise it changes the global value.
>> [ This for "automatically buffer-local variables".  ]
>
> What you say is indeed what I observe, but I do not see how it follows
> from the quoted manual text. When I read the above part of the manual, I
> see a warning about using `set'/`setq' inside `let' that binds the same
> variable.

But it is talking about make-variable-buffer-local, so "the variable" is
a local variable, IMHO.

> I think that the caveat about binding buffer-local variables should be
> documented.





reply via email to

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