From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: enhancement/wish Date: Wed, 29 Oct 2008 08:26:30 +0100 Message-ID: <49081026.1040106@swipnet.se> References: <4906BF50.40709@swipnet.se> <49074040.7060102@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225265247 8922 80.91.229.12 (29 Oct 2008 07:27:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Oct 2008 07:27:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Bernhard Koenig Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 29 08:28:29 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kv5Tg-0006hA-HG for ged-emacs-devel@m.gmane.org; Wed, 29 Oct 2008 08:28:28 +0100 Original-Received: from localhost ([127.0.0.1]:45823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kv5Sa-0005N8-6k for ged-emacs-devel@m.gmane.org; Wed, 29 Oct 2008 03:27:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kv5S4-00056m-7o for emacs-devel@gnu.org; Wed, 29 Oct 2008 03:26:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kv5S0-00054c-JF for emacs-devel@gnu.org; Wed, 29 Oct 2008 03:26:46 -0400 Original-Received: from [199.232.76.173] (port=48894 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kv5S0-00054V-Cz for emacs-devel@gnu.org; Wed, 29 Oct 2008 03:26:44 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:16981) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kv5S0-0004vq-1j for emacs-devel@gnu.org; Wed, 29 Oct 2008 03:26:44 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.159]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kv5Rz-0006Ed-2D for emacs-devel@gnu.org; Wed, 29 Oct 2008 03:26:43 -0400 Original-Received: by fg-out-1718.google.com with SMTP id l26so2834762fgb.30 for ; Wed, 29 Oct 2008 00:26:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding:sender; bh=FgecXLoGMDqdnxFsky7WkSzwtk66jsTQBB9q8V8+skw=; b=pspTx+gqI1iT0dMKsswr8s3IGZDXs34mNbukCK91jbdwnzEdgYC+2cD6Ad4ywcDBt0 uYBj8+eNVIE/ut7+t6IqN3neShUdlMv4liROz9FydopneRWp4C7iHjPWjyI/8hNwB4TY BtzWq3PIYxwM/4zspUBTWzuummY75A/jxD2Zc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :sender; b=e3nycA5NCzwcEwR9rrQpcCtI8oijXY7DXpzawdhrYBmmYYhp2L/e8OfwPs/tY85EMy INMdXyaDVJg++FTiJJuI2IbsPGWz8UR1Bil9d9ExmHpETN3CGV/Fy+37bldrv2s1wIom a1Wp/SgIViAgKXGAM3CANBtY5lMcffd/+BEgo= Original-Received: by 10.86.51.10 with SMTP id y10mr5330233fgy.51.1225265201588; Wed, 29 Oct 2008 00:26:41 -0700 (PDT) Original-Received: from ?10.225.40.36? ([193.45.43.33]) by mx.google.com with ESMTPS id 3sm3287236fge.3.2008.10.29.00.26.32 (version=SSLv3 cipher=RC4-MD5); Wed, 29 Oct 2008 00:26:39 -0700 (PDT) User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) In-Reply-To: X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105131 Archived-At: 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.