unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 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

* Re: tool-bar changes when in minibuffer
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2008-04-28 17:46 UTC (permalink / raw)
  To: David Reitter; +Cc: emacs- devel

> 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?

That sounds OK.


        Stefan




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tool-bar changes when in minibuffer
  2008-04-28 17:46 ` Stefan Monnier
@ 2008-04-29 19:32   ` David Reitter
  0 siblings, 0 replies; 3+ messages in thread
From: David Reitter @ 2008-04-29 19:32 UTC (permalink / raw)
  To: emacs- devel

On 28 Apr 2008, at 18:46, Stefan Monnier wrote:
>
>> Would it be problematic to stick with previous tool-bar, but  
>> disable all
>> items?
>
> That sounds OK.

Wouldn't this be best implemented on the C level?
Could I lodge a feature request please?  (Do we have feature requests  
analogous to the tracked bugs now?)





^ 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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).