From: Richard M. Stallman Date: Thu, 18 Feb 1999 01:10:46 +0000 (+0000) Subject: (easy-menu-get-map): Don't crash if (current-local-map) is nil. X-Git-Tag: emacs-20.4~608 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3373a131dbf45da9ad119fd2bc9ea6522e7369c5;p=emacs.git (easy-menu-get-map): Don't crash if (current-local-map) is nil. --- 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." ;; 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)))