(easy-menu-get-map): Don't crash if (current-local-map) is nil.

This commit is contained in:
Richard M. Stallman 1999-02-18 01:10:46 +00:00
parent 0a162908c8
commit 3373a131db

View file

@ -479,8 +479,9 @@ NAME should be a string, the name of the element to be removed."
;; Return a sparse keymap in which to add or remove an item.
;; MAP and PATH are as defined in `easy-menu-add-item'.
(if (null map)
(let ((local (lookup-key (current-local-map)
(vconcat '(menu-bar) (mapcar 'intern path))))
(let ((local (and (current-local-map)
(lookup-key (current-local-map)
(vconcat '(menu-bar) (mapcar 'intern path)))))
(global (lookup-key global-map
(vconcat '(menu-bar) (mapcar 'intern path)))))
(if (and local (not (integerp local)))