emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 36ae1c721a 1/2: Make imenu-flush-cache into a function


From: Lars Ingebrigtsen
Subject: master 36ae1c721a 1/2: Make imenu-flush-cache into a function
Date: Fri, 13 May 2022 08:30:16 -0400 (EDT)

branch: master
commit 36ae1c721ab4bd610087d353d6bd255a20b2f59b
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make imenu-flush-cache into a function
    
    * doc/emacs/programs.texi (Imenu): Remove documentation.
    
    * lisp/imenu.el (imenu-flush-cache): Make into a function, since
    this isn't supposed to be used interactively.
---
 doc/emacs/programs.texi | 5 -----
 etc/NEWS                | 2 +-
 lisp/imenu.el           | 5 ++---
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 2b27d4e13c..2720bdda6f 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -280,11 +280,6 @@ changes in the text.
 than @code{imenu-auto-rescan-maxout} in bytes, and scanning is
 stopped if it takes more than @code{imenu-max-index-time} seconds.
 
-@findex imenu-flush-cache
-  You can force Imenu to forget the buffer's index with @w{@kbd{M-x
-imenu-flush-cache @key{RET}}}.  This causes Imenu to rescan the
-current buffer next time you invoke @kbd{M-g i} in that buffer.
-
 @vindex imenu-sort-function
   You can customize the way the menus are sorted by setting the
 variable @code{imenu-sort-function}.  By default, names are ordered as
diff --git a/etc/NEWS b/etc/NEWS
index 267880ef19..a67e136643 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -666,7 +666,7 @@ available options can be restored by enabling this option.
 *** 'imenu' is now bound to 'M-g i' globally.
 
 ---
-*** New command 'imenu-flush-cache'.
+*** New function 'imenu-flush-cache'.
 Use it if you want Imenu to forget the buffer's index alist and
 recreate it anew next time 'imenu' is invoked.
 
diff --git a/lisp/imenu.el b/lisp/imenu.el
index a08c58f682..2636e77d08 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -903,9 +903,8 @@ for more information."
   "Flush the current imenu cache.
 This forces a full rescan of the buffer to recreate the index alist
 next time `imenu' is invoked."
-  (interactive)
-  (setq imenu--index-alist nil)
-  (message "Flushed the imenu cache"))
+  (imenu--cleanup)
+  (setq imenu--index-alist nil))
 
 (provide 'imenu)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]