From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: Eli Zaretskii <eliz@gnu.org>,
emacs-devel@gnu.org, angelo.graziosi@alice.it
Subject: Re: Where is tool bar?
Date: Sat, 24 Apr 2010 22:03:14 -0400 [thread overview]
Message-ID: <jwvaass8f3a.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <4BD2B9BC.7030000@swipnet.se> ("Jan Djärv"'s message of "Sat, 24 Apr 2010 11:28:28 +0200")
> 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.
next prev parent reply other threads:[~2010-04-25 2:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 21:55 Where is tool bar? Angelo Graziosi
2010-04-24 6:50 ` Jan Djärv
2010-04-24 7:41 ` Eli Zaretskii
2010-04-24 8:42 ` Angelo Graziosi
2010-04-24 9:28 ` Jan Djärv
2010-04-25 2:03 ` Stefan Monnier [this message]
2010-04-25 7:31 ` Jan Djärv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvaass8f3a.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=angelo.graziosi@alice.it \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jan.h.d@swipnet.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).