changeset 24270:02ae21f066ec

(imenu--last-menubar-index-alist): Add doc. (imenu-add-to-menubar): Reset imenu--last-menubar-index-alist.
author Richard M. Stallman <rms@gnu.org>
date Sat, 06 Feb 1999 21:50:53 +0000
parents a29550b1d150
children bab606b16c3c
files lisp/imenu.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/imenu.el	Sat Feb 06 05:50:59 1999 +0000
+++ b/lisp/imenu.el	Sat Feb 06 21:50:53 1999 +0000
@@ -426,8 +426,9 @@
 
 (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 @@
 		   '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]