Subject: bug#30449: imenu contains redundant '*Rescan*' item with auto refresh

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 17 Sep 2019 01:38:49 +0200

Lars Ingebrigtsen <[email-masked]> writes:

>> With imenu package when auto rescan is enabled:
>>
>>   (setq imenu-auto-rescan t)
>>
>> imenu shows a  '*Refresh*' option,

[...]

> I don't use imenu, so I can't really test, but does the following fix
> the problem?

[...]

> -  ;; 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)))

There was no response, but it seems "obviously correct", so I'm applying
the patch.  Feel free to revert if it's the wrong thing to do.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no