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

From: Ihor Radchenko <[email-masked]>
Date: Tue, 02 Jan 2024 11:17:17 +0000

Gerd Möllmann <[email-masked]> writes:

>> (defvar-local yant/test 'default-value)
>> (with-temp-buffer
>>   (setq yant/test 'local-value)
>>   (default-value 'yant/test)) ; => 'default-value
>
> Maybe the documentation could be changed to be clearer, but I'm afraid I
> don't know how, because I think it describes 100% what is happening: the
> setq creates a buffer-local binding in the temp buffer, and
> default-value returns the value that is used in the case that a buffer
> does _not_ have its own value, which is the value set in the
> defvar-local...

We clearly have some misunderstanding.
Doesn't your statement contradict the earlier one:

   >>>> doc string that reads "that do not have their own values...", which
   >>>> means that what default-value returns depends whether or not SYMBOL got
   >>>> its own value in the buffer

In my example, SYMBOL does get its own value in the buffer, but
`default-value' still returns 'default-value.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>