emacs-devel
[Top][All Lists]
Advanced

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

tool-bar changes when in minibuffer


From: David Reitter
Subject: tool-bar changes when in minibuffer
Date: Mon, 28 Apr 2008 16:31:36 +0100

My locally defined tool-bar changes when I enter the minibuffer, e.g. when editing a buffer in LaTeX mode (with AUCTeX) and then doing C-c C- c to compile.

This seems perfectly logical given that the minibuffer is treated as a separate "buffer" which does not specify its own tool-bar-map.

Still, the visual effect of a changing tool-bar is distracting and doesn't make much sense, given that one would not normally use tool- bar items to edit anything in the minibuffer (I'm sure one could copy and paste...).

Would it be problematic to stick with previous tool-bar, but disable all items? The code below illustrates what I mean. It works, but ignores tool-bar items coming from the mode-map of the major mode, and it does not disable the items.



(defun keep-tool-bar ()
  (let ((former-tool-bar-map
         (with-current-buffer (window-buffer (minibuffer-selected-window))
           tool-bar-map)))
    (if former-tool-bar-map
        (set (make-local-variable 'tool-bar-map) former-tool-bar-map))))

(add-hook 'minibuffer-setup-hook 'keep-tool-bar)




reply via email to

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