diff options
| author | Lars Ingebrigtsen | 2022-05-12 04:24:32 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-05-12 04:24:32 +0200 |
| commit | 30fa6da5529f80df25fcba49d10cd8a806774868 (patch) | |
| tree | 217baa45632876ab565ec0e0736ab99444c48de4 | |
| parent | 42001f843bb7ca687bf5096543a5d478dab38b87 (diff) | |
| download | emacs-30fa6da5529f80df25fcba49d10cd8a806774868.tar.gz emacs-30fa6da5529f80df25fcba49d10cd8a806774868.zip | |
Add new command 'imenu-flush-cache'
* lisp/imenu.el (imenu-flush-cache): New command (bug#20589).
| -rw-r--r-- | etc/NEWS | 7 | ||||
| -rw-r--r-- | lisp/imenu.el | 6 |
2 files changed, 12 insertions, 1 deletions
| @@ -660,8 +660,13 @@ Rcirc will use the default 'completion-at-point' mechanism. The | |||
| 660 | conventional IRC behaviour of completing by cycling through the | 660 | conventional IRC behaviour of completing by cycling through the |
| 661 | available options can be restored by enabling this option. | 661 | available options can be restored by enabling this option. |
| 662 | 662 | ||
| 663 | ** imenu | ||
| 664 | |||
| 663 | +++ | 665 | +++ |
| 664 | ** 'imenu' is now bound to 'M-g i' globally. | 666 | *** 'imenu' is now bound to 'M-g i' globally. |
| 667 | |||
| 668 | --- | ||
| 669 | *** New command 'imenu-flush-cache'. | ||
| 665 | 670 | ||
| 666 | * Editing Changes in Emacs 29.1 | 671 | * Editing Changes in Emacs 29.1 |
| 667 | 672 | ||
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." | |||
| 899 | (`(,name . ,pos) (imenu (list name pos imenu-default-goto-function))) | 899 | (`(,name . ,pos) (imenu (list name pos imenu-default-goto-function))) |
| 900 | (_ (error "Unknown imenu item: %S" index-item))))) | 900 | (_ (error "Unknown imenu item: %S" index-item))))) |
| 901 | 901 | ||
| 902 | (defun imenu-flush-cache () | ||
| 903 | "Flush the current imenu cache." | ||
| 904 | (interactive) | ||
| 905 | (setq imenu--index-alist nil) | ||
| 906 | (message "Flushed the imenu cache")) | ||
| 907 | |||
| 902 | (provide 'imenu) | 908 | (provide 'imenu) |
| 903 | 909 | ||
| 904 | ;;; imenu.el ends here | 910 | ;;; imenu.el ends here |