From: Lars Ingebrigtsen <larsi@gnus.org>
To: Campbell Barton <ideasman42@gmail.com>
Cc: 30449@debbugs.gnu.org
Subject: bug#30449: imenu contains redundant '*Rescan*' item with auto refresh
Date: Sun, 14 Jul 2019 18:32:45 +0200 [thread overview]
Message-ID: <87zhlgy3te.fsf@mouse.gnus.org> (raw)
In-Reply-To: <CAEcf3Nx+RnXKThK1yAdJudF7zLTQn6-xGBQao2V+0B17p2jx6g@mail.gmail.com> (Campbell Barton's message of "Wed, 14 Feb 2018 08:12:00 +1100")
Campbell Barton <ideasman42@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
next prev parent reply other threads:[~2019-07-14 16:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 21:12 bug#30449: imenu contains redundant '*Rescan*' item with auto refresh Campbell Barton
2019-07-14 16:32 ` Lars Ingebrigtsen [this message]
2019-09-16 23:38 ` Lars Ingebrigtsen
2019-09-19 21:36 ` Matthew Newton
2019-09-20 13:02 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zhlgy3te.fsf@mouse.gnus.org \
--to=larsi@gnus.org \
--cc=30449@debbugs.gnu.org \
--cc=ideasman42@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.