summaryrefslogtreecommitdiff
path: root/lisp/tool-bar.el
diff options
context:
space:
mode:
authorJan D <jan.h.d@swipnet.se>2010-04-25 09:23:01 +0200
committerJan D <jan.h.d@swipnet.se>2010-04-25 09:23:01 +0200
commit7ac82b84051a250bf529a0a83e68dacac39a948d (patch)
tree515ad83612586aa52c056c3f5845596eeb1d680d /lisp/tool-bar.el
parentdfbbda83af47a8d3e39682639cc60f128d15f5d5 (diff)
downloademacs-7ac82b84051a250bf529a0a83e68dacac39a948d.tar.gz
tool-bar.el: Revert unintended checkin in 2010-04-23T16:26:11Z!monnier@iro.umontreal.ca.
Diffstat (limited to 'lisp/tool-bar.el')
-rw-r--r--lisp/tool-bar.el30
1 files changed, 15 insertions, 15 deletions
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el
index c1fcd530d60..a05d05daeb9 100644
--- a/lisp/tool-bar.el
+++ b/lisp/tool-bar.el
@@ -243,24 +243,24 @@ holds a keymap."
;; Last element in the bound key sequence:
(kk (aref k (1- (length k)))))
(if (and (keymapp m)
- (symbolp kk)) ;FIXME: Why? --Stef
+ (symbolp kk))
(setq submap m
key kk)))))
- (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)
+ (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))
(define-key-after in-map (vector key)
- (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))))))))
+ (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.