unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Joel J. Adamson" <adamsonj@email.unc.edu>
To: Stefan Vollmar <vollmar@nf.mpg.de>
Cc: help-gnu-emacs@gnu.org, Kevin Rodgers <kevin.d.rodgers@gmail.com>
Subject: Re: making change of tool-bar entry persistent
Date: Wed, 26 May 2010 08:37:47 -0400	[thread overview]
Message-ID: <30653.1274877467@chondestes.bio.unc.edu> (raw)
In-Reply-To: <0547183E-969C-4E19-BEDA-98AF01B43F32@nf.mpg.de>

[-- Attachment #1: Type: text/plain, Size: 1870 bytes --]

Stefan Vollmar <vollmar@nf.mpg.de> wrote:

> Dear Kevin,
> 
> On 25.05.2010, at 08:23, Kevin Rodgers wrote:
> 
> > Stefan Vollmar wrote:
> >> Hallo,
> >> I want to re-define what happends when an exising toolbar icon is
> >> pressed. In the Emacs documentation I found an example similar to
> >> this:
> >> (define-key   global-map   [tool-bar new-file]
> >>  '(menu-item "New Buffer" my-new-buffer
> >> 			  :image (image :type xpm :file "new.xpm")))
> > > Executing this code in Emacs 23.2 this will indeed show the desired
> > > effect - but only for about 2 seconds: the tool-bar is then
> > > automatically redrawn and behaves as before. How can I modify an
> > > existing toolbar so that the change is persistent?
> > 
> > -- Variable: tool-bar-map
> >     By default, the global map binds `[tool-bar]' as follows:
> >          (global-set-key [tool-bar]
> >          		'(menu-item "tool bar" ignore
> >          			    :filter (lambda (ignore) tool-bar-map)))
> >     Thus the tool bar map is derived dynamically from the value of
> >     variable `tool-bar-map' and you should normally adjust the default
> >     (global) tool bar by changing that map.  Major modes may replace
> >     the global bar completely by making `tool-bar-map' buffer-local
> >     and set to a keymap containing only the desired items.  Info mode
> >     provides an example.
> 
> 
> I looked up how changing the toolbar is done in info.el and was able
> to solve my problem with this code:

I was able to get my "Make Button" working with this --- the only
question is how to get it into the spot I want it: right before the Help
button.

Can anybody direct me to the documentation for this?

Thanks,

Joel

-- 
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill

FSF Member #8164
http://www.unc.edu/~adamsonj

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2010-05-26 12:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-23 14:11 making change of tool-bar entry persistent Stefan Vollmar
2010-05-25  6:23 ` Kevin Rodgers
2010-05-25 22:53   ` Stefan Vollmar
2010-05-26 12:37     ` Joel J. Adamson [this message]
2010-05-26 19:35       ` Stefan Vollmar

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=30653.1274877467@chondestes.bio.unc.edu \
    --to=adamsonj@email.unc.edu \
    --cc=help-gnu-emacs@gnu.org \
    --cc=kevin.d.rodgers@gmail.com \
    --cc=vollmar@nf.mpg.de \
    /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.
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).