diff options
Diffstat (limited to 'lisp/toolbar')
-rw-r--r-- | lisp/toolbar/tool-bar.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/toolbar/tool-bar.el b/lisp/toolbar/tool-bar.el index ab11bc8b450..42adca58a95 100644 --- a/lisp/toolbar/tool-bar.el +++ b/lisp/toolbar/tool-bar.el @@ -208,8 +208,13 @@ MAP must contain appropriate binding for `[menu-bar]' which holds a keymap." (append (cdr defn) (list :image image) props)) (setq defn (cdr defn)) (define-key-after in-map (vector key) - (append `(menu-item ,(car defn) ,(cdr defn)) - (list :image image) 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) props)))))))) ;;; Set up some global items. Additions/deletions up for grabs. |