auctex-devel
[Top][All Lists]
Advanced

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

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


From: Miguel V. S. Frasson
Subject: Re: [AUCTeX-devel] toolbar-x.el modifies global value of `tool-bar-map'
Date: Wed, 13 Sep 2006 13:58:24 -0300

Hi Reiner

Good catch. Please commit this.

Miguel.

On 9/13/06, Reiner Steib <address@hidden> wrote:
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/


_______________________________________________
auctex-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/auctex-devel






--
Miguel Vinicius Santini Frasson
address@hidden




reply via email to

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