Reiner Steib <[EMAIL PROTECTED]> writes:
> On Thu, Nov 09 2006, David Kastrup wrote:
> * toolbar-x.el (toolbarx-emacs-refresh): Don't modify global value
> of `tool-bar-map'.
>
> --8<---------------cut here---------------start------------->8---
> --- toolbar-x.el 25 May 2006 07:50:57 -0000 1.12
> +++ toolbar-x.el 13 Sep 2006 20:15:00 -0000 1.13
> @@ -1322,7 +1322,8 @@
> toolbarx-internal-button-switches))
> (used-keys (list :used-symbols nil))
> (tool-bar-map-temp))
> - (let ((tool-bar-map (make-sparse-keymap)))
> + (let (tool-bar-map)
> + (set (make-local-variable 'tool-bar-map) (make-sparse-keymap))
Eek. That can't be right. The previous version did not modify any
global value of tool-bar-map, but made a local let-binding.
The changed version first creates a let-binding, _then_ makes a local
variable. What will happen when the let-binding is dissolved?
>From the Elisp manual:
(info "(elisp) Creating Buffer-Local")
[...]
Making a variable buffer-local within a `let'-binding for that
variable does not work reliably, unless the buffer in which you do
this is not current either on entry to or exit from the `let'.
This is because `let' does not distinguish between different kinds
of bindings; it knows only which variable the binding was made for.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
_______________________________________________
bug-auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-auctex