diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-05-12 04:24:32 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-05-12 04:24:32 +0200 |
commit | 30fa6da5529f80df25fcba49d10cd8a806774868 (patch) | |
tree | 217baa45632876ab565ec0e0736ab99444c48de4 /lisp/imenu.el | |
parent | 42001f843bb7ca687bf5096543a5d478dab38b87 (diff) | |
download | emacs-30fa6da5529f80df25fcba49d10cd8a806774868.tar.gz |
Add new command 'imenu-flush-cache'
* lisp/imenu.el (imenu-flush-cache): New command (bug#20589).
Diffstat (limited to 'lisp/imenu.el')
-rw-r--r-- | lisp/imenu.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/imenu.el b/lisp/imenu.el index a87860f0065..e452b1bb8b9 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 |