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

From: Matthew Newton <[email-masked]>
Date: Thu, 19 Sep 2019 14:36:47 -0700

Hi Lars,

I found this issue after finding a downstream problem in the counsel package. See the related issue I started:

https://github.com/abo-abo/swiper/issues/2241

I don’t know the codebase at all and I just spent a couple minutes looking at it. But shouldn’t imenu--make-index-alist always return a list? So the last lines would be:

(if imenu-auto-rescan
      imenu--index-alist
    ;; Add a rescan option to the index.
    (cons imenu--rescan-item imenu--index-alist))

Cheers,
Matt