From 0cff96e7cee5f808876ba09c91aaa25e1c311422 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 6 Feb 1999 21:50:53 +0000 Subject: [PATCH] (imenu--last-menubar-index-alist): Add doc. (imenu-add-to-menubar): Reset imenu--last-menubar-index-alist. --- lisp/imenu.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/imenu.el b/lisp/imenu.el index f9b33b80b47..4fa74b7ec72 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -426,8 +426,9 @@ This variable is local in all buffers, once set.") (make-variable-buffer-local 'imenu--index-alist) -;; The latest buffer index used to update the menu bar menu. -(defvar imenu--last-menubar-index-alist nil) +(defvar imenu--last-menubar-index-alist nil + "The latest buffer index used to update the menu bar menu.") + (make-variable-buffer-local 'imenu--last-menubar-index-alist) ;; History list for 'jump-to-function-in-buffer'. @@ -991,6 +992,7 @@ See the command `imenu' for more information." 'imenu-default-create-index-function))) (let ((newmap (make-sparse-keymap)) (menu-bar (lookup-key (current-local-map) [menu-bar]))) + (setq imenu--last-menubar-index-alist nil) (define-key newmap [menu-bar] (append (make-sparse-keymap) menu-bar)) (define-key newmap [menu-bar index] -- 2.39.2