Add menu to news-mode

* lisp/textmodes/emacs-news-mode.el (emacs-news-mode-map): Add binding
for 'emacs-news-delete-temporary-markers'.
(emacs-news-mode-menu): Add menu for common actions.
This commit is contained in:
Robert Pluim 2023-02-16 10:40:40 +01:00
parent 40f4bc4e0a
commit 5bc88b3b17

View file

@ -54,12 +54,27 @@
"C-c C-s" #'emacs-news-next-untagged-entry
"C-c C-r" #'emacs-news-previous-untagged-entry
"C-c C-t" #'emacs-news-toggle-tag
"C-c C-d" #'emacs-news-delete-temporary-markers
"C-c C-g" #'emacs-news-goto-section
"C-c C-j" #'emacs-news-find-heading
"C-c C-e" #'emacs-news-count-untagged-entries
"C-x C-q" #'emacs-news-view-mode
"<remap> <open-line>" #'emacs-news-open-line)
(easy-menu-define emacs-news-mode-menu emacs-news-mode-map
"Menu for `emacs-news-mode'."
'("News"
["Next Untagged" emacs-news-next-untagged-entry :help "Go to next untagged entry"]
["Previous Untagged" emacs-news-previous-untagged-entry :help "Go to previous untagged entry"]
["Count Untagged" emacs-news-count-untagged-entries :help "Count the number of untagged entries"]
["Toggle Tag" emacs-news-toggle-tag :help "Toggle documentation tag of current entry"]
["Delete Tags" emacs-news-delete-temporary-markers :help "Delete all documentation tags in buffer"]
"--"
["Goto Section" emacs-news-goto-section :help "Prompt for section and go to it"]
["Goto Heading" emacs-news-find-heading :help "Prompt for heading and go to it"]
"--"
["Enter View Mode" emacs-news-view-mode :help "Enter view-only mode"]))
(defvar emacs-news-view-mode-map
;; This is defined this way instead of inheriting because we're
;; deriving the mode from `special-mode' and want the keys from there.