diff --git a/etc/NEWS b/etc/NEWS index 672260ca82b..cf2ae19ce73 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 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