[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-devel] toolbar-x.el modifies global value of `tool-bar-map'
From: |
Reiner Steib |
Subject: |
[AUCTeX-devel] toolbar-x.el modifies global value of `tool-bar-map' |
Date: |
Wed, 13 Sep 2006 15:35:42 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
Hi,
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 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.
--8<---------------cut here---------------start------------->8---
--- 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
--8<---------------cut here---------------end--------------->8---
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
toolbar-x-2006-09-13.png
Description: PNG image
- [AUCTeX-devel] toolbar-x.el modifies global value of `tool-bar-map',
Reiner Steib <=