1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-12 02:40:34 -08:00

Add new command 'imenu-flush-cache'

* lisp/imenu.el (imenu-flush-cache): New command (bug#20589).
This commit is contained in:
Lars Ingebrigtsen 2022-05-12 04:24:32 +02:00
parent 42001f843b
commit 30fa6da552
2 changed files with 12 additions and 1 deletions

View file

@ -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

View file

@ -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