]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix imenu menu when we're auto-refreshing
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 16 Sep 2019 23:39:37 +0000 (01:39 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 16 Sep 2019 23:39:37 +0000 (01:39 +0200)
* lisp/imenu.el (imenu--make-index-alist): Don't add a *Refresh*
item if we're auto-refreshing (bug#30449).

lisp/imenu.el

index 5084fe61effccf698610c0884a8b44c5bd070e03..9df597b4d63845fea7fbb297d68cd3a235ddb779 100644 (file)
@@ -510,8 +510,9 @@ See `imenu--index-alist' for the format of the index alist."
        "No items suitable for an index found in this buffer"))
   (or imenu--index-alist
       (setq imenu--index-alist (list nil)))
-  ;; Add a rescan option to the index.
-  (cons imenu--rescan-item imenu--index-alist))
+  (unless imenu-auto-rescan
+    ;; Add a rescan option to the index.
+    (cons imenu--rescan-item imenu--index-alist)))
 
 (defvar imenu--cleanup-seen nil)