emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/tool-bar.el,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/tool-bar.el,v
Date: Tue, 13 May 2008 17:52:37 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/05/13 17:52:33

Index: tool-bar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/tool-bar.el,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- tool-bar.el 7 May 2008 18:16:28 -0000       1.14
+++ tool-bar.el 13 May 2008 17:52:31 -0000      1.15
@@ -93,9 +93,13 @@
 Its main job is to figure out which images to use based on the display's
 color capability and based on the available image libraries."
   (mapcar (lambda (bind)
-            (let (image-exp)
+            (let (image-exp plist)
               (when (and (eq (car-safe (cdr-safe bind)) 'menu-item)
-                         (setq image-exp (plist-get bind :image))
+                        ;; For the format of menu-items, see node
+                        ;; `Extended Menu Items' in the Elisp manual.
+                        (setq plist (nthcdr (if (consp (nth 4 bind)) 5 4)
+                                            bind))
+                        (setq image-exp (plist-get plist :image))
                          (consp image-exp)
                          (not (eq (car image-exp) 'image))
                          (fboundp (car image-exp)))
@@ -104,8 +108,10 @@
                   (let ((image (eval image-exp)))
                     (unless (image-mask-p image)
                       (setq image (append image '(:mask heuristic))))
-                    (setq bind (copy-sequence bind))
-                    (plist-put bind :image image))))
+                   (setq bind (copy-sequence bind)
+                         plist (nthcdr (if (consp (nth 4 bind)) 5 4)
+                                       bind))
+                   (plist-put plist :image image))))
               bind))
          tool-bar-map))
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]