[Top][All Lists]

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

[AUCTeX-devel] Re: toolbar-x.el modifies global value of `tool-bar-map'

From: Reiner Steib
Subject: [AUCTeX-devel] Re: toolbar-x.el modifies global value of `tool-bar-map'
Date: Wed, 13 Sep 2006 17:19:57 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

On Wed, Sep 13 2006, Reiner Steib wrote:

[ For people like myself, who filter articles < 70 KB, I repeat the
  post with an URL instead of the attachment:

  Sorry for wasting your bandwidth. ]

> I noticed that when visiting some LaTeX files (during the last weeks),
> the global tool bar got empty or vanished completely in non-LaTeX
> buffers.  It is extremely annoying then you hit `C-c C-c' because the
> Emacs frame shrinks as shown in the frames with a yellow background in
> the attached screen shot.  

The frames with a white background correspond to an AUCTeX session
with my patch applied.

> The problem occurred when LaTeX files were involved.
> I found out that the global value of `tool-bar-map' is (keymap) in
> such a situation, which is what `make-sparse-keymap' returns.  I
> suspect that at least one use of `make-sparse-keymap' in
> `toolbar-x.el' is wrong.  Apparently `toolbar-x.el' modifies the
> _global_ value of `tool-bar-map'.  The following patch seems to fix
> this problem.  I'll commit it unless someone points out a problem with
> this or offers a better solution.
> --- toolbar-x.el      26 May 2006 13:47:26 +0200      1.12
> +++ toolbar-x.el      13 Sep 2006 15:08:56 +0200      
> @@ -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))
>        (toolbarx-emacs-refresh-process-button-or-insert-list switches 
> used-keys)
>        (setq tool-bar-map-temp (copy-sequence tool-bar-map)))
>      (if global-flag

Bye, Reiner.
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |

reply via email to

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