GNU bug report logs -
#66117
30.0.50; `find-buffer-visiting' is slow when opening large number of buffers
Previous Next
Reported by: Ihor Radchenko <yantar92 <at> posteo.net>
Date: Wed, 20 Sep 2023 08:53:02 UTC
Severity: minor
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #352 received at 66117 <at> debbugs.gnu.org (full text, mbox):
>> Maybe I'm confused, but won't this change have at least _some_ effect
>> on Lisp programs? For example, what about this fragment from the
>> 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.
>>
>> Will this case work the same after the change as it did before?
>
> I read this differently - when you have
>
> (let ((var 'val))
> (make-variable-buffer-local 'var))
>
> it will not set buffer-local value to 'val.
So, what the paragraph above says is that
(setq var val)
will make `var` buffer-local, but
(let ((var val))
...)
will not and neither will
(let ((var val))
...
(setq var val2)
...)
IOW, `setq` makes the var buffer-local only when the assignment affects
the global binding.
The same holds for DEFVAR_PER_BUFFER variables like `case-fold-search`:
(with-temp-buffer
(let ((case-fold-search nil))
(list (local-variable-p 'case-fold-search)
(setq case-fold-search t)
(local-variable-p 'case-fold-search))))
==> (nil t nil)
-- Stefan
This bug report was last modified 1 year and 135 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.