bug-auctex
[Top][All Lists]
Advanced

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

Re: [Bug-AUCTeX] Re: 11.83; AUCTeX toolbar


From: David Kastrup
Subject: Re: [Bug-AUCTeX] Re: 11.83; AUCTeX toolbar
Date: Fri, 10 Nov 2006 00:20:34 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Reiner Steib <address@hidden> 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




reply via email to

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