GNU bug report logs -
#30449
imenu contains redundant '*Rescan*' item with auto refresh
Previous Next
Reported by: Campbell Barton <ideasman42 <at> gmail.com>
Date: Tue, 13 Feb 2018 21:17:01 UTC
Severity: wishlist
Tags: fixed, moreinfo, patch
Merged with 37460
Found in version 27.0.50
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 30449 <at> debbugs.gnu.org (full text, mbox):
Campbell Barton <ideasman42 <at> gmail.com> writes:
> With imenu package when auto rescan is enabled:
>
> (setq imenu-auto-rescan t)
>
> imenu shows a '*Refresh*' option,
> which should not be displayed when auto-rescan is used.
>
> See reference: https://emacs.stackexchange.com/a/38808/2418
I don't use imenu, so I can't really test, but does the following fix
the problem?
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 5084fe61ef..9df597b4d6 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -510,8 +510,9 @@ imenu--make-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)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 320 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.