]> git.eshelyaron.com Git - emacs.git/commitdiff
tool-bar.el: Revert unintended checkin in 2010-04-23T16:26:11Z!monnier@iro.umontreal.ca.
authorJan D <jan.h.d@swipnet.se>
Sun, 25 Apr 2010 07:23:01 +0000 (09:23 +0200)
committerJan D <jan.h.d@swipnet.se>
Sun, 25 Apr 2010 07:23:01 +0000 (09:23 +0200)
lisp/ChangeLog
lisp/tool-bar.el

index f23a9156c1812ef549df5c782a8971c4333d7953..e6e8dcabadb065a0ee015d01f7d42a252d2631f9 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-25  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * tool-bar.el (tool-bar-local-item-from-menu): Revert unintended
+       checkin in 2010-04-23T16:26:11Z!monnier@iro.umontreal.ca.
+
 2010-04-24  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/authors.el (authors-obsolete-files-regexps):
index c1fcd530d609fc559254e4f6e9d4e79676085cd2..a05d05daeb921885ebb001f063fc59c6367e65f1 100644 (file)
@@ -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.