From: Stefan Monnier Date: Wed, 11 Apr 2012 21:37:13 +0000 (-0400) Subject: * lisp/imenu.el (imenu-add-to-menubar): `current-local-map' can be nil. X-Git-Tag: emacs-24.2.90~471^2~364^2~26 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6622e4169bdd3a7b73af6d2f8d006740954cca96;p=emacs.git * lisp/imenu.el (imenu-add-to-menubar): `current-local-map' can be nil. Reported by Noah Friedman. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 09c5654e767..265a456242a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-04-11 Stefan Monnier + * imenu.el (imenu-add-to-menubar): `current-local-map' can be nil. + Reported by Noah Friedman. + * subr.el (read-passwd): Use read-string. 2012-04-11 Lars Magne Ingebrigtsen diff --git a/lisp/imenu.el b/lisp/imenu.el index 8363956355b..5472f4246d1 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -963,7 +963,8 @@ See the command `imenu' for more information." imenu-generic-expression (not (eq imenu-create-index-function 'imenu-default-create-index-function))) - (unless (keymapp (lookup-key (current-local-map) [menu-bar index])) + (unless (and (current-local-map) + (keymapp (lookup-key (current-local-map) [menu-bar index]))) (let ((newmap (make-sparse-keymap))) (set-keymap-parent newmap (current-local-map)) (setq imenu--last-menubar-index-alist nil)