From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Where is tool bar? Date: Sat, 24 Apr 2010 22:03:14 -0400 Message-ID: References: <4BD21769.5070906@alice.it> <4BD29499.30806@swipnet.se> <83pr1p1em1.fsf@gnu.org> <4BD2B9BC.7030000@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1272161008 12639 80.91.229.12 (25 Apr 2010 02:03:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 25 Apr 2010 02:03:28 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org, angelo.graziosi@alice.it To: Jan =?iso-8859-1?Q?Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 25 04:03:26 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1O5rBu-0003bU-DK for ged-emacs-devel@m.gmane.org; Sun, 25 Apr 2010 04:03:26 +0200 Original-Received: from localhost ([127.0.0.1]:54890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5rBt-0005Cv-Ua for ged-emacs-devel@m.gmane.org; Sat, 24 Apr 2010 22:03:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5rBo-0005Cp-Pf for emacs-devel@gnu.org; Sat, 24 Apr 2010 22:03:20 -0400 Original-Received: from [140.186.70.92] (port=35513 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5rBn-0005Cd-9q for emacs-devel@gnu.org; Sat, 24 Apr 2010 22:03:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5rBm-0001KV-1d for emacs-devel@gnu.org; Sat, 24 Apr 2010 22:03:19 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:25358 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5rBj-0001KA-To; Sat, 24 Apr 2010 22:03:16 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAO4/00vO+KoL/2dsb2JhbACcMnK5AYUMBIwN X-IronPort-AV: E=Sophos;i="4.52,268,1270440000"; d="scan'208";a="62301455" Original-Received: from 206-248-170-11.dsl.teksavvy.com (HELO pastel.home) ([206.248.170.11]) by ironport2-out.pppoe.ca with ESMTP; 24 Apr 2010 22:03:15 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 2062582C3; Sat, 24 Apr 2010 22:03:15 -0400 (EDT) In-Reply-To: <4BD2B9BC.7030000@swipnet.se> ("Jan =?iso-8859-1?Q?Dj=E4rv=22?= =?iso-8859-1?Q?'s?= message of "Sat, 24 Apr 2010 11:28:28 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.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:124187 Archived-At: > Well, actually it isn't that change, but in that revision tool-bar.el also > changed, but there is no changelog entry for it so I don't know what it is > supposed to fix or enhance. Reverting tool-bar.el (to 100009) restores the > tool bar. Oops, sorry pilot error: I expected only the first hunk (the added comment) and didn't notice the other. Could someone undo that for me? Stefan > Here is a diff: > === modified file 'lisp/tool-bar.el' > --- lisp/tool-bar.el 2010-04-20 18:52:07 +0000 > +++ lisp/tool-bar.el 2010-04-23 16:26:11 +0000 > @@ -232,6 +232,7 @@ > submap key) > ;; We'll pick up the last valid entry in the list of keys if > ;; there's more than one. > + ;; FIXME: Aren't they *all* "valid"?? --Stef > (dolist (k keys) > ;; We're looking for a binding of the command in a submap of > ;; the menu bar map, so the key sequence must be two or more > @@ -242,24 +243,24 @@ > ;; Last element in the bound key sequence: > (kk (aref k (1- (length k))))) > (if (and (keymapp m) > - (symbolp kk)) > + (symbolp kk)) ;FIXME: Why? --Stef > (setq submap m > key kk))))) > - (when (and (symbolp submap) (boundp submap)) > - (setq submap (eval submap))) > - (let ((defn (assq key (cdr submap)))) > - (if (eq (cadr defn) 'menu-item) > - (define-key-after in-map (vector key) > - (append (cdr defn) (list :image image-exp) props)) > - (setq defn (cdr defn)) > + (when submap > + (let ((defn nil)) > + ;; Here, we're essentially doing a "lookup-key without get_keyelt". > + (map-keymap (lambda (k b) (if (eq k key) (setq defn b))) > + submap) > (define-key-after in-map (vector key) > - (let ((rest (cdr defn))) > - ;; If the rest of the definition starts > - ;; with a list of menu cache info, get rid of that. > - (if (and (consp rest) (consp (car rest))) > - (setq rest (cdr rest))) > - (append `(menu-item ,(car defn) ,rest) > - (list :image image-exp) props))))))) > + (if (eq (car defn) 'menu-item) > + (append (cdr defn) (list :image image-exp) props) > + (let ((rest (cdr defn))) > + ;; If the rest of the definition starts > + ;; with a list of menu cache info, get rid of that. > + (if (and (consp rest) (consp (car rest))) > + (setq rest (cdr rest))) > + (append `(menu-item ,(car defn) ,rest) > + (list :image image-exp) props)))))))) > ;;; Set up some global items. Additions/deletions up for grabs. > Jan D.