From 587ff2fe25b0a75726f090001441bca76aa0ce4b Mon Sep 17 00:00:00 2001 From: Greg Bognar Date: Tue, 21 Dec 2021 21:19:03 +0100 Subject: Add menu (thanks, Greg!) --- nov.el | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'nov.el') diff --git a/nov.el b/nov.el index 4153573..9f675d8 100644 --- a/nov.el +++ b/nov.el @@ -52,6 +52,7 @@ (require 'xml) (require 'bookmark) +(require 'easymenu) (require 'imenu) (require 'org) (require 'recentf) @@ -420,6 +421,35 @@ Each alist item consists of the identifier and full path." (define-key map (kbd "c") 'nov-copy-url) map)) +(easy-menu-define nov-mode-menu nov-mode-map "Menu for nov-mode" + '("EPUB" + ["Next" nov-next-document + :help "Go to the next document"] + ["Previous" nov-previous-document + :help "Go to the previous document"] + ["Backward" nov-history-back + :help "Go back in the history to the last visited document"] + ["Forward" nov-history-forward + :help "Go forward in the history of visited documents"] + ["Next Link" shr-next-link + :help "Go to the next link"] + ["Previous Link" shr-previous-link + :keys "M-TAB" + :help "Go to the previous link"] + ["Table of Contents" nov-goto-toc + :help "Display the table of contents"] + ["Redisplay" nov-render-document + :help "Redisplay the document"] + "---" + ["View Metadata" nov-display-metadata + :help "View the metadata of the EPUB document"] + ["View HTML Source" nov-view-source + :help "View the HTML source of the current document in a new buffer"] + ["View OPF Source" nov-view-content-source + :help "View the OPF source of the EPUB document in a new buffer"] + ["View as Archive" nov-reopen-as-archive + :help "Reopen the EPUB document as an archive"])) + (defun nov-clean-up () "Delete temporary files of the current EPUB buffer." (when nov-temp-dir -- cgit v1.2.3