summaryrefslogtreecommitdiff
path: root/lisp/imenu.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-04-11 17:37:13 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-04-11 17:37:13 -0400
commit6622e4169bdd3a7b73af6d2f8d006740954cca96 (patch)
tree127d28cd92db50018fc2e0a4dfaafe298d7126fd /lisp/imenu.el
parent088be6fbd27b21c1f53445f5a55164552d5fc84c (diff)
downloademacs-6622e4169bdd3a7b73af6d2f8d006740954cca96.tar.gz
* lisp/imenu.el (imenu-add-to-menubar): `current-local-map' can be nil.
Reported by Noah Friedman.
Diffstat (limited to 'lisp/imenu.el')
-rw-r--r--lisp/imenu.el3
1 files changed, 2 insertions, 1 deletions
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)