]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/imenu.el (imenu-add-to-menubar): `current-local-map' can be nil.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 11 Apr 2012 21:37:13 +0000 (17:37 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 11 Apr 2012 21:37:13 +0000 (17:37 -0400)
Reported by Noah Friedman.

lisp/ChangeLog
lisp/imenu.el

index 09c5654e767de4dfb0042f1c2dbfcfe1f6e8ff9f..265a456242aa5374099ea0f00bb9d1ea531456a4 100644 (file)
@@ -1,5 +1,8 @@
 2012-04-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * 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  <larsi@gnus.org>
index 8363956355b863396470b39803309730f5e61946..5472f4246d1ec50c484f88a826321923bc26eccd 100644 (file)
@@ -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)