(imenu--menubar-select): Handle the "rescan" item.
authorRichard M. Stallman <rms@gnu.org>
Fri, 8 Mar 1996 21:51:22 +0000 (21:51 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 8 Mar 1996 21:51:22 +0000 (21:51 +0000)
lisp/imenu.el

index b97f951..a8d9d15 100644 (file)
@@ -833,7 +833,12 @@ See the command `imenu' for more information."
 
 (defun imenu--menubar-select (item)
   "Use Imenu to select the function or variable named in this menu item."
-  (imenu item))
+  (if (equal item '("*Rescan*" . -99))
+      (progn
+       (imenu--cleanup)
+       (setq imenu--index-alist nil)
+       (imenu-update-menubar))
+    (imenu item)))
 
 ;;;###autoload
 (defun imenu (index-item)