From 5bc88b3b175e4442f3c4160131a96e438ad2d10c Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Thu, 16 Feb 2023 10:40:40 +0100 Subject: [PATCH] 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. --- lisp/textmodes/emacs-news-mode.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lisp/textmodes/emacs-news-mode.el b/lisp/textmodes/emacs-news-mode.el index b844955e1be..c6efb4fe7ca 100644 --- a/lisp/textmodes/emacs-news-mode.el +++ b/lisp/textmodes/emacs-news-mode.el @@ -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 " " #'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. -- 2.39.2