aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1999-02-18 01:10:46 +0000
committerRichard M. Stallman1999-02-18 01:10:46 +0000
commit3373a131dbf45da9ad119fd2bc9ea6522e7369c5 (patch)
tree583a397a08a6c9af3ac83528eef5a0f12e182cc6
parent0a162908c83e159c307b3256a114eae2f90e47a2 (diff)
downloademacs-3373a131dbf45da9ad119fd2bc9ea6522e7369c5.tar.gz
emacs-3373a131dbf45da9ad119fd2bc9ea6522e7369c5.zip
(easy-menu-get-map): Don't crash if (current-local-map) is nil.
-rw-r--r--lisp/emacs-lisp/easymenu.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index a8a50db923e..0b02508c2c9 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -479,8 +479,9 @@ NAME should be a string, the name of the element to be removed."
479 ;; Return a sparse keymap in which to add or remove an item. 479 ;; Return a sparse keymap in which to add or remove an item.
480 ;; MAP and PATH are as defined in `easy-menu-add-item'. 480 ;; MAP and PATH are as defined in `easy-menu-add-item'.
481 (if (null map) 481 (if (null map)
482 (let ((local (lookup-key (current-local-map) 482 (let ((local (and (current-local-map)
483 (vconcat '(menu-bar) (mapcar 'intern path)))) 483 (lookup-key (current-local-map)
484 (vconcat '(menu-bar) (mapcar 'intern path)))))
484 (global (lookup-key global-map 485 (global (lookup-key global-map
485 (vconcat '(menu-bar) (mapcar 'intern path))))) 486 (vconcat '(menu-bar) (mapcar 'intern path)))))
486 (if (and local (not (integerp local))) 487 (if (and local (not (integerp local)))