From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?SmFuIERqw6Rydg==?= Newsgroups: gmane.emacs.devel Subject: Re: Where is tool bar? Date: Sat, 24 Apr 2010 11:28:28 +0200 Message-ID: <4BD2B9BC.7030000@swipnet.se> References: <4BD21769.5070906@alice.it> <4BD29499.30806@swipnet.se> <83pr1p1em1.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1272101475 5071 80.91.229.12 (24 Apr 2010 09:31:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 24 Apr 2010 09:31:15 +0000 (UTC) Cc: angelo.graziosi@alice.it, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 24 11:31:14 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 1O5bhh-0005De-UB for ged-emacs-devel@m.gmane.org; Sat, 24 Apr 2010 11:31:14 +0200 Original-Received: from localhost ([127.0.0.1]:55170 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5bhh-0001vv-7s for ged-emacs-devel@m.gmane.org; Sat, 24 Apr 2010 05:31:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5bfC-00016I-Iz for emacs-devel@gnu.org; Sat, 24 Apr 2010 05:28:38 -0400 Original-Received: from [140.186.70.92] (port=38392 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5bfB-00015X-46 for emacs-devel@gnu.org; Sat, 24 Apr 2010 05:28:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5bfA-0004xm-13 for emacs-devel@gnu.org; Sat, 24 Apr 2010 05:28:36 -0400 Original-Received: from smtprelay-h12.telenor.se ([62.127.194.5]:59579) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5bf5-0004xE-9j; Sat, 24 Apr 2010 05:28:31 -0400 Original-Received: from ipb3.telenor.se (ipb3.telenor.se [195.54.127.166]) by smtprelay-h12.telenor.se (Postfix) with ESMTP id 9CA3ADA1D; Sat, 24 Apr 2010 11:29:20 +0200 (CEST) X-SENDER-IP: [85.225.45.110] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsBBAAZW0ktV4S1uPGdsb2JhbACDFoRSlEkMAQEBATUtqSyQVIEmgnltBA X-IronPort-AV: E=Sophos;i="4.52,266,1270418400"; d="scan'208";a="511612866" Original-Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by ipb3.telenor.se with ESMTP; 24 Apr 2010 11:28:29 +0200 Original-Received: from [172.20.199.2] (gaffa [172.20.199.2]) by coolsville.localdomain (Postfix) with ESMTP id E24827FA05A; Sat, 24 Apr 2010 11:28:28 +0200 (CEST) User-Agent: Thunderbird 2.0.0.24 (X11/20100411) In-Reply-To: <83pr1p1em1.fsf@gnu.org> 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:124164 Archived-At: Eli Zaretskii skrev: >> Date: Sat, 24 Apr 2010 08:50:01 +0200 >> From: Jan Dj=C3=A4rv >> Cc: Emacs >> >> Details please. What build, what toolkit, how did you get there from = emacs -Q? >=20 > FWIW, I see it on MS-Windows (the native build, not the Cygwin build > used by Angelo, AFAIK), with today's trunk. The only visible tool-bar > buttons are "Cut", "Copy", "Paste", "Customize", and "Help". >=20 > It happens immediately upon startup with -Q, no additional commands > are necessary. >=20 Ok, thanks. I thought it was some special mode, since there was an "Inde= x"=20 menu entry in the screen shot. This change introduced the error: revno: 100010 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2010-04-23 12:26:11 -0400 message: Provide byte-compiler warnings when set-default a read-only var. * emacs-lisp/bytecomp.el (byte-compile-set-default): New function. (byte-compile-setq-default): Optimize for the single-var case and don't call byte-compile-form in this case to avoid inf-loop with byte-compile-set-default. Well, actually it isn't that change, but in that revision tool-bar.el als= o=20 changed, but there is no changelog entry for it so I don't know what it i= s=20 supposed to fix or enhance. Reverting tool-bar.el (to 100009) restores th= e=20 tool bar. Here is a diff: =3D=3D=3D 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_keyel= t". + (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.