]> git.eshelyaron.com Git - emacs.git/commitdiff
(easy-menu-get-map): Don't crash if (current-local-map) is nil.
authorRichard M. Stallman <rms@gnu.org>
Thu, 18 Feb 1999 01:10:46 +0000 (01:10 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 18 Feb 1999 01:10:46 +0000 (01:10 +0000)
lisp/emacs-lisp/easymenu.el

index a8a50db923e6738a717bb0a84c4915e1d211ac50..0b02508c2c971a631354cad23510aad24a4f4c08 100644 (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)))