From 4517fe3a47700373d03fb389ff038572a1144f5b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 11 Apr 2012 17:41:58 -0400 Subject: [PATCH] * imenu.el (imenu-add-to-menubar): `current-local-map' can be nil. Reported by Noah Friedman. Backport from trunk. --- lisp/ChangeLog | 16 ++++++++++------ lisp/imenu.el | 3 ++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9ef18ad7086..00183d9ebb2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,9 +1,13 @@ +2012-04-11 Stefan Monnier + + * imenu.el (imenu-add-to-menubar): `current-local-map' can be nil. + Reported by Noah Friedman. Backport from trunk. + 2012-04-11 Alan Mackenzie - * progmodes/cc-menus.el (cc-imenu-objc-generic-expression): Make - imenu work again for Objective C Mode. Correct the *-index - values, these having been disturbed by a previous change in - 2011-08. + * progmodes/cc-menus.el (cc-imenu-objc-generic-expression): + Make imenu work again for Objective C Mode. Correct the *-index + values, these having been disturbed by a previous change in 2011-08. * progmodes/cc-engine.el (c-before-change-check-<>-operators): Correct two search limits. @@ -56,8 +60,8 @@ 2012-04-07 Eli Zaretskii - * minibuffer.el (completion-in-region-mode-map): Bind - completion-help-at-point to M-? rather than ?. (Bug#11182) + * minibuffer.el (completion-in-region-mode-map): + Bind completion-help-at-point to M-? rather than ?. (Bug#11182) 2012-04-05 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) -- 2.39.5