From f1d7969d317cf01bd6f5cf4b37dd05b765e3a39d Mon Sep 17 00:00:00 2001 From: Dave Love Date: Sun, 8 Oct 2000 09:37:01 +0000 Subject: [PATCH] (imenu-add-to-menubar): Fix last change. --- lisp/imenu.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lisp/imenu.el b/lisp/imenu.el index cce78645c2b..8f223d3fb1c 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -1001,11 +1001,9 @@ See the command `imenu' for more information." (let ((newmap (make-sparse-keymap))) (set-keymap-parent newmap (current-local-map)) (setq imenu--last-menubar-index-alist nil) - (define-key newmap [menu-bar] - (let ((map (make-sparse-keymap))) - (define-key map [index] - `(menu-item ,name ,(make-sparse-keymap "Imenu"))) - map)) + (define-key newmap [menu-bar index] + (define-key map [index] + `(menu-item ,name ,(make-sparse-keymap "Imenu")))) (use-local-map newmap) (add-hook 'menu-bar-update-hook 'imenu-update-menubar)) (error "The mode `%s' does not support Imenu" mode-name))) -- 2.39.2