unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: emacs- devel <emacs-devel@gnu.org>
Subject: tool-bar changes when in minibuffer
Date: Mon, 28 Apr 2008 16:31:36 +0100	[thread overview]
Message-ID: <05BD7E3F-AC9E-4C2B-8BD2-EB65CB85BBAC@gmail.com> (raw)

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	other threads:[~2008-04-28 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-28 15:31 David Reitter [this message]
2008-04-28 17:46 ` tool-bar changes when in minibuffer Stefan Monnier
2008-04-29 19:32   ` David Reitter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05BD7E3F-AC9E-4C2B-8BD2-EB65CB85BBAC@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).