From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bill Wohler Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: tool-bar-setup overwrites local tool-bar-map Date: Sun, 30 Apr 2006 11:23:34 -0700 Organization: Newt Software Message-ID: <30570.1146421414@olgas.newt.com> References: <31860.1145577819@olgas.newt.com> <423.1145580259@olgas.newt.com> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1146421444 9281 80.91.229.2 (30 Apr 2006 18:24:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Apr 2006 18:24:04 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 30 20:23:58 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FaGaH-0001zV-0U for ged-emacs-devel@m.gmane.org; Sun, 30 Apr 2006 20:23:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaGaG-0008O8-8L for ged-emacs-devel@m.gmane.org; Sun, 30 Apr 2006 14:23:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FaGa4-0008Nr-NG for emacs-devel@gnu.org; Sun, 30 Apr 2006 14:23:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FaGa3-0008N8-0t for emacs-devel@gnu.org; Sun, 30 Apr 2006 14:23:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaGa2-0008N5-VV; Sun, 30 Apr 2006 14:23:38 -0400 Original-Received: from [207.69.195.70] (helo=pop-borzoi.atl.sa.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FaGdd-00032U-Pf; Sun, 30 Apr 2006 14:27:21 -0400 Original-Received: from h-64-105-34-169.snvacaid.dynamic.covad.net ([64.105.34.169] helo=olgas.newt.com) by pop-borzoi.atl.sa.earthlink.net with esmtp (Exim 3.36 #10) id 1FaGZz-0002bD-00; Sun, 30 Apr 2006 14:23:35 -0400 Original-Received: by olgas.newt.com (Postfix, from userid 1000) id 85C4816FB7; Sun, 30 Apr 2006 11:23:34 -0700 (PDT) Original-Received: from olgas.newt.com (localhost [127.0.0.1]) by olgas.newt.com (Postfix) with ESMTP id 80A8916FB4; Sun, 30 Apr 2006 11:23:34 -0700 (PDT) Original-To: rms@gnu.org In-reply-to: Comments: In-reply-to Richard Stallman message dated "Sat, 29 Apr 2006 23:04:32 -0400." X-Mailer: MH-E 7.94+cvs; nmh 1.1; GNU Emacs 22.0.50 X-Image-URL: http://www.newt.com/wohler/images/bill-diving.png Mail-Followup-To: emacs-pretest-bug@gnu.org, emacs-devel@gnu.org 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:53687 gmane.emacs.pretest.bugs:11875 Archived-At: Richard Stallman wrote: > > To see what should have happened: > > > > emacs22 -Q > > M-x tool-bar-mode > > > > Note how Preferences and Help icons are present. > > > > M-x info > > > > Note how Preferences and Help icons are absent. > > In what sense is that "what should have happened"? I do not follow. You get the tool bar as the info package had intended. > Shouldn't the Preferences and Help icons always be present? Arguably yes, but their function is context-dependent. For example, the MH-E package defines the actions as mh-tool-bar-customize and mh-tool-bar-folder-help or mh-tool-bar-letter-help where the default actions are customize and help. With the current tool-bar code, the behavior is inconsistent. If one runs tool-bar-mode first, and then MH-E, one sees the one pair of Preferences/Help buttons (the ones defined by MH-E). If vice-versa, one sees *two* pairs of Preferences/Help buttons (the ones defined by MH-E plus the ones defined by tool-bar). Similarly, if one runs tool-bar-mode first, and then info, one does not see the pair of Preferences/Help buttons since the info package does not define them. If vice-versa, one sees the pair of Preferences/Help buttons defined by tool-bar. Does that help clear things up? > What are you asking us to do? My patch makes the tool-bar's behavior consistent. It prevents the default tool bar from interfering with the mode's tool bar if tool-bar-mode is run after the mode has been initialized. I just wanted a review and a "Please check it in" before checking it in. Perhaps Nick Roberts? Here it is again. Index: tool-bar.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/tool-bar.el,v retrieving revision 1.5 diff -u -u -r1.5 tool-bar.el --- tool-bar.el 6 Feb 2006 14:33:35 -0000 1.5 +++ tool-bar.el 30 Apr 2006 18:21:10 -0000 @@ -267,14 +267,16 @@ ;;(tool-bar-add-item-from-menu 'compose-mail "mail/compose") (tool-bar-add-item-from-menu 'print-buffer "print") - (tool-bar-add-item "preferences" 'customize 'customize - :help "Edit preferences (customize)") + (tool-bar-local-item "preferences" 'customize 'customize + (default-value 'tool-bar-map) + :help "Edit preferences (customize)") - (tool-bar-add-item "help" (lambda () - (interactive) - (popup-menu menu-bar-help-menu)) - 'help - :help "Pop up the Help menu") + (tool-bar-local-item "help" (lambda () + (interactive) + (popup-menu menu-bar-help-menu)) + 'help + (default-value 'tool-bar-map) + :help "Pop up the Help menu") ) (provide 'tool-bar) -- Bill Wohler http://www.newt.com/wohler/ GnuPG ID:610BD9AD Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian! If you're passed on the right, you're in the wrong lane.