diff options
author | Stefan Kangas <stefan@marxist.se> | 2022-08-12 18:33:34 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2022-08-12 18:35:23 +0200 |
commit | a2cf5646d4cb3a2444ba53eb5452509f3ad9c6f7 (patch) | |
tree | a3f2235b5a7e2d408d5f73deb345b6c44d9b15c9 /lisp/textmodes/emacs-authors-mode.el | |
parent | 779d920c9a09f1c75067d092571f4172a8b5c570 (diff) | |
download | emacs-a2cf5646d4cb3a2444ba53eb5452509f3ad9c6f7.tar.gz emacs-a2cf5646d4cb3a2444ba53eb5452509f3ad9c6f7.tar.bz2 emacs-a2cf5646d4cb3a2444ba53eb5452509f3ad9c6f7.zip |
Support imenu in emacs-authors-mode
* lisp/textmodes/emacs-authors-mode.el
(emacs-authors-imenu-generic-expression): New variable.
(emacs-authors-mode): Add imenu support.
Diffstat (limited to 'lisp/textmodes/emacs-authors-mode.el')
-rw-r--r-- | lisp/textmodes/emacs-authors-mode.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/textmodes/emacs-authors-mode.el b/lisp/textmodes/emacs-authors-mode.el index c9ec0e8cf81..ffb713fd682 100644 --- a/lisp/textmodes/emacs-authors-mode.el +++ b/lisp/textmodes/emacs-authors-mode.el @@ -119,6 +119,12 @@ With a prefix arg ARG, move point that many authors backward." (interactive "p" emacs-authors-mode) (emacs-authors-next-author (- arg))) +(defvar emacs-authors-imenu-generic-expression + `((nil ,(rx bol (group (+ (not ":"))) ": " + (or "wrote" "co-wrote" "changed") + " ") + 1))) + (define-obsolete-variable-alias 'etc-authors-mode-map 'emacs-authors-mode-map "29.1") (defvar-keymap emacs-authors-mode-map :doc "Keymap for `emacs-authors-mode'." @@ -132,6 +138,7 @@ Provides some basic font locking and not much else." (setq-local font-lock-defaults '(emacs-authors-mode-font-lock-keywords nil nil ((?_ . "w")))) (setq font-lock-multiline nil) + (setq imenu-generic-expression emacs-authors-imenu-generic-expression) (emacs-authors-mode--hide-local-variables)) (define-obsolete-face-alias 'etc-authors-default 'emacs-authors-default "29.1") |