From: "Jan D." <jan.h.d@swipnet.se>
To: Bernhard Koenig <b.a.koenig@googlemail.com>
Cc: emacs-devel@gnu.org
Subject: Re: enhancement/wish
Date: Wed, 29 Oct 2008 08:26:30 +0100 [thread overview]
Message-ID: <49081026.1040106@swipnet.se> (raw)
In-Reply-To: <de34c09f0810281340l2d5782e0n41ace2d59190a5dc@mail.gmail.com>
Bernhard Koenig skrev:
> OK, I see that there is a command tool-bar-local-item but it's not
> listed in http://www.gnu.org/software/emacs/elisp/html_node/Tool-Bar.html
>
> I guess the syopsis is
> tool-bar-local-item icon def key map &rest props
> but what is "map" in the case of "LaTeX-mode-hook"? Or in case of the info mode?
>
From what I see, LaTeX-mode-hook does not set its own tool bar map. So
you should not have to do anything. It should work. Are you sure
recentf-mode is on when you switch to latex-mode?
As for info mode, just put your code in a defun:
(defun my-tool-bar-addition ()
;; the code you have goes here
)
(add-hook 'Info-mode-hook 'my-tool-bar-addition)
As info mode makes tool-bar-map a buffer local variable, your old code
continues to work. Instead of putting stuff into the global
tool-bar-mode it now adds stuff to info-modes tool bar map. No need to
mess about with tool-bar-local-item.
For other modes, you have to find their hook variable.
AFAIK, there is no way to add an item to "all tool bars", so it
automatically gets added to new tool bars that modes may install. Maybe
we need such a command.
Jan D.
next prev parent reply other threads:[~2008-10-29 7:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-25 0:36 enhancement/wish Bernhard Koenig
2008-10-25 8:12 ` enhancement/wish Eli Zaretskii
[not found] ` <de34c09f0810250129m5fea708bh78e06f9219fd864@mail.gmail.com>
2008-10-25 10:25 ` enhancement/wish Eli Zaretskii
2008-10-25 15:20 ` enhancement/wish David Reitter
2008-10-25 20:21 ` enhancement/wish Bernhard Koenig
2008-10-27 23:38 ` enhancement/wish Bernhard Koenig
2008-10-28 4:12 ` enhancement/wish Eli Zaretskii
2008-10-28 5:11 ` enhancement/wish Bernhard Koenig
[not found] ` <4906BF50.40709@swipnet.se>
2008-10-28 8:17 ` enhancement/wish Bernhard Koenig
2008-10-28 8:38 ` enhancement/wish Bernhard Koenig
2008-10-28 16:39 ` enhancement/wish Jan Djärv
2008-10-28 20:40 ` enhancement/wish Bernhard Koenig
2008-10-29 7:01 ` enhancement/wish Bernhard Koenig
2008-10-29 7:26 ` Jan D. [this message]
2008-10-29 7:40 ` enhancement/wish Bernhard Koenig
2008-10-29 11:21 ` enhancement/wish Jan D.
2008-10-29 17:01 ` enhancement/wish Chming
2008-10-29 20:10 ` enhancement/wish Bernhard Koenig
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49081026.1040106@swipnet.se \
--to=jan.h.d@swipnet.se \
--cc=b.a.koenig@googlemail.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 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.