Reported by Noah Friedman.
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>
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)