From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Joel J. Adamson" Newsgroups: gmane.emacs.help Subject: Re: making change of tool-bar entry persistent Date: Wed, 26 May 2010 08:37:47 -0400 Organization: University of North Carolina Message-ID: <30653.1274877467@chondestes.bio.unc.edu> References: <7A9A5E4F-DE42-449C-B94B-1966BBD90E46@nf.mpg.de> <0547183E-969C-4E19-BEDA-98AF01B43F32@nf.mpg.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1274877505 21333 80.91.229.12 (26 May 2010 12:38:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 26 May 2010 12:38:25 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Kevin Rodgers To: Stefan Vollmar Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 26 14:38:24 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OHFsK-0006Au-1c for geh-help-gnu-emacs@m.gmane.org; Wed, 26 May 2010 14:38:20 +0200 Original-Received: from localhost ([127.0.0.1]:48655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHFsJ-0006vF-EF for geh-help-gnu-emacs@m.gmane.org; Wed, 26 May 2010 08:38:19 -0400 Original-Received: from [140.186.70.92] (port=40180 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHFrr-0006vA-P6 for help-gnu-emacs@gnu.org; Wed, 26 May 2010 08:37:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHFrq-0003DK-Ae for help-gnu-emacs@gnu.org; Wed, 26 May 2010 08:37:51 -0400 Original-Received: from chondestes.bio.unc.edu ([152.2.67.61]:58252) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHFrq-0003DC-5R for help-gnu-emacs@gnu.org; Wed, 26 May 2010 08:37:50 -0400 Original-Received: from chondestes.bio.unc.edu (chondestes.bio.unc.edu [127.0.0.1]) by chondestes.bio.unc.edu (8.14.3/8.14.3) with ESMTP id o4QCblLO030655; Wed, 26 May 2010 08:37:48 -0400 In-reply-to: <0547183E-969C-4E19-BEDA-98AF01B43F32@nf.mpg.de> Comments: In-reply-to Stefan Vollmar message dated "Wed, 26 May 2010 00:53:30 +0200." X-Image-URL: http://www.unc.edu/~adamsonj/favicon.ico Face: /home/joel/.face X-Milkshake: Drainage! X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.1.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73768 Archived-At: --=-=-= Content-Transfer-Encoding: quoted-printable Stefan Vollmar wrote: > Dear Kevin, >=20 > On 25.05.2010, at 08:23, Kevin Rodgers wrote: >=20 > > 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? > >=20 > > -- 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. >=20 >=20 > 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 =2D-=20 Joel J. Adamson Servedio Lab University of North Carolina at Chapel Hill FSF Member #8164 http://www.unc.edu/~adamsonj --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkv9FhsACgkQdjuynxXap4SsHwCghKVrvzIiJanby6y/WOHtRdvG FPMAn1HIrMh60PsFJYblZoXg82b38FuR =1KBI -----END PGP SIGNATURE----- --=-=-=--