Subject: Re: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers

From: Gerd Möllmann <[email-masked]>
Date: Thu, 21 Dec 2023 14:39:47 +0100

Ihor Radchenko <[email-masked]> writes:

> Stefan Monnier <[email-masked]> writes:
>
>>> (let ((test/foo2 t))
>>>   (default-value 'test/foo2)) ;; -> t ???
>>
>> Yup.
>
> Hmm.. Then, what about
>
> (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)))

C-h f default-value explains this:

  Return SYMBOL’s default value.
  This is the value that is seen in buffers that do not have their own values
  for this variable.

>     (should (eq 'bar let-tests-buffer-local-var))
>     (with-temp-buffer
>       (should (eq 'bar (default-value 'let-tests-buffer-local-var)))
>       (should (eq 'bar let-tests-buffer-local-var)))))