* tool-bar changes when in minibuffer
@ 2008-04-28 15:31 David Reitter
2008-04-28 17:46 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: David Reitter @ 2008-04-28 15:31 UTC (permalink / raw)
To: emacs- devel
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-29 19:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28 15:31 tool-bar changes when in minibuffer David Reitter
2008-04-28 17:46 ` Stefan Monnier
2008-04-29 19:32 ` David Reitter
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.