From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.help Subject: Re: replace default tool-bar by home-grown tool-bar Date: Wed, 19 Dec 2007 10:15:23 +1300 Message-ID: <18280.14443.113550.982381@kahikatea.snap.net.nz> References: <5sqjslF1aqhorU1@mid.dfncis.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1198012569 13226 80.91.229.12 (18 Dec 2007 21:16:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Dec 2007 21:16:09 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: matthias Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 18 22:16:20 2007 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.50) id 1J4jnW-0008MX-NL for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Dec 2007 22:16:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4jnD-00015O-DO for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Dec 2007 16:15:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J4jmz-00014r-01 for help-gnu-emacs@gnu.org; Tue, 18 Dec 2007 16:15:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J4jmx-00014W-Hz for help-gnu-emacs@gnu.org; Tue, 18 Dec 2007 16:15:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4jmx-00014P-Dm for help-gnu-emacs@gnu.org; Tue, 18 Dec 2007 16:15:43 -0500 Original-Received: from viper.snap.net.nz ([202.37.101.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J4jmx-0006Pp-4f for help-gnu-emacs@gnu.org; Tue, 18 Dec 2007 16:15:43 -0500 Original-Received: from kahikatea.snap.net.nz (42.61.255.123.dynamic.snap.net.nz [123.255.61.42]) by viper.snap.net.nz (Postfix) with ESMTP id 934B63D9F65; Wed, 19 Dec 2007 10:15:33 +1300 (NZDT) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 939748FC6D; Wed, 19 Dec 2007 10:15:24 +1300 (NZDT) Original-Newsgroups: gnu.emacs.help In-Reply-To: <5sqjslF1aqhorU1@mid.dfncis.de> X-Mailer: VM 7.19 under Emacs 23.0.50.13 X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:50188 Archived-At: > i am meditating over chapter 22.17 from the Emacs Lisp-manual for a > while and couldn't really get a hint on how to have my own tool-bar. I > understand how to define a keymap that describes the tool-bar but how do > i tell emacs to use my keymap? Maybe it is too obvious, but i can't > figure it out... 22.17.6 says (for edition 2.9, GNU Emacs version 23.0.50 but that for 22.1 is probably the same) : 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. Looking at info.el: (set (make-local-variable 'tool-bar-map) info-tool-bar-map) and info-tool-bar-map is created using tool-bar-local-item-from-menu Is that not clear? > I didn't find any hooks for the tool-bar. While they are used so > frequently i wonder why there is none in this case. Wouldn't it be a > good idea to have one that defines all the buttons in the tool-bar? > If you can point me to a very simple example that would be nice. gud.el provides another example. -- Nick http://www.inet.net.nz/~nickrob