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

From: Campbell Barton <[email-masked]>
Date: Wed, 14 Feb 2018 08:12:00 +1100

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

----

In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2018-02-09 built on bisson
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=0
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  highlight-numbers-mode: t
  global-auto-complete-mode: t
  auto-complete-mode: t
  drag-stuff-global-mode: t
  drag-stuff-mode: t
  fci-mode: t
  whitespace-mode: t
  global-hl-line-mode: t
  show-paren-mode: t
  ivy-mode: t
  savehist-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  evil-leader-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  flyspell-mode: t
  shell-dirtrack-mode: t
  evil-mode: t
  evil-local-mode: t
  visual-indentation-mode: t
  tooltip-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Loading visual-indentation-mode...done
Loading /home/ideasman42/.emacs.d/custom.el (source)...done
Starting new Ispell process /usr/bin/aspell with default dictionary...

Load-path shadows:
/home/ideasman42/.emacs.d/elpa/cmake-mode-20180104.1137/cmake-mode
hides /usr/share/emacs/site-lisp/cmake-mode
/home/ideasman42/.emacs.d/elpa/let-alist-1.0.5/let-alist hides
/usr/share/emacs/25.3/lisp/emacs-lisp/let-alist

Features:
(shadow sort mail-extr emacsbug message idna format-spec rfc822 mml
mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils
colir color counsel dired esh-util etags xref project swiper
highlight-numbers parent-mode flymake compile company
auto-complete-config auto-complete popup smart-tabs-mode cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs drag-stuff inkpot-theme fill-column-indicator disp-table
whitespace hl-line paren ivy delsel ivy-overlay ffap url-parse
auth-source cl-seq eieio eieio-core cl-macs gnus-util mm-util help-fns
mail-prsvr password-cache url-vars savehist evil-surround evil-leader
evil evil-integration undo-tree diff evil-maps evil-commands reveal
flyspell ispell evil-jumps evil-command-window evil-types evil-search
evil-ex shell pcomplete comint ansi-color evil-macros evil-repeat
evil-states evil-core advice evil-common windmove thingatpt rect
evil-digraphs evil-vars ring edmacro kmacro visual-indentation-mode
finder-inf info package epg-config seq byte-opt gv bytecomp byte-compile
cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 288973 15259)
 (symbols 48 36176 0)
 (miscs 40 480 965)
 (strings 32 71477 10611)
 (string-bytes 1 2201254)
 (vectors 16 32691)
 (vector-slots 8 670043 7265)
 (floats 8 502 98)
 (intervals 56 597 0)
 (buffers 976 19))