[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 30fa6da552: Add new command 'imenu-flush-cache'
From: |
Lars Ingebrigtsen |
Subject: |
master 30fa6da552: Add new command 'imenu-flush-cache' |
Date: |
Wed, 11 May 2022 22:24:45 -0400 (EDT) |
branch: master
commit 30fa6da5529f80df25fcba49d10cd8a806774868
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Add new command 'imenu-flush-cache'
* lisp/imenu.el (imenu-flush-cache): New command (bug#20589).
---
etc/NEWS | 7 ++++++-
lisp/imenu.el | 6 ++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index 672260ca82..cf2ae19ce7 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -660,8 +660,13 @@ Rcirc will use the default 'completion-at-point'
mechanism. The
conventional IRC behaviour of completing by cycling through the
available options can be restored by enabling this option.
+** imenu
+
+++
-** 'imenu' is now bound to 'M-g i' globally.
+*** 'imenu' is now bound to 'M-g i' globally.
+
+---
+*** New command 'imenu-flush-cache'.
* Editing Changes in Emacs 29.1
diff --git a/lisp/imenu.el b/lisp/imenu.el
index a87860f006..e452b1bb8b 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -899,6 +899,12 @@ for more information."
(`(,name . ,pos) (imenu (list name pos imenu-default-goto-function)))
(_ (error "Unknown imenu item: %S" index-item)))))
+(defun imenu-flush-cache ()
+ "Flush the current imenu cache."
+ (interactive)
+ (setq imenu--index-alist nil)
+ (message "Flushed the imenu cache"))
+
(provide 'imenu)
;;; imenu.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 30fa6da552: Add new command 'imenu-flush-cache',
Lars Ingebrigtsen <=