diff options
author | Richard M. Stallman <rms@gnu.org> | 2002-05-05 03:06:58 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2002-05-05 03:06:58 +0000 |
commit | 2fab432898e38d3b76d384011360cb0ea83a0559 (patch) | |
tree | 4bf455e04dec3a2bef8c516815eda4310584d50d /lisp/toolbar | |
parent | cd56bfef62f8999e62e666773b7d8c40413090c3 (diff) | |
download | emacs-2fab432898e38d3b76d384011360cb0ea83a0559.tar.gz |
(tool-bar-local-item-from-menu): Handle both cases: when the menu item
has cached info and when it doesn't.
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. |