diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2022-11-21 09:28:05 +0100 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2022-11-21 09:28:32 +0100 |
commit | 4536ce86d00111c0530334abe085f6bd6a7da92f (patch) | |
tree | 32e7e24375d9ed5ba13805b1d09f1f4a7f8b6091 | |
parent | d9d8a2eba92c4e6ef4145f222c43c86f75875ce2 (diff) | |
download | emacs-4536ce86d00111c0530334abe085f6bd6a7da92f.tar.gz |
* lisp/woman.el (woman-mode-map): Prefer defvar-keymap.
-rw-r--r-- | lisp/woman.el | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/lisp/woman.el b/lisp/woman.el index 7f494a3b686..2b456fed3cb 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1751,21 +1751,17 @@ Leave point at end of new text. Return length of inserted text." ;;; Major mode (Man) interface: -(defvar woman-mode-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map Man-mode-map) - - (define-key map "R" #'woman-reformat-last-file) - (define-key map "w" #'woman) - (define-key map "\en" #'WoMan-next-manpage) - (define-key map "\ep" #'WoMan-previous-manpage) - (define-key map [M-mouse-2] #'woman-follow-word) - - ;; We don't need to call `man' when we are in `woman-mode'. - (define-key map [remap man] #'woman) - (define-key map [remap man-follow] #'woman-follow) - map) - "Keymap for `woman-mode'.") +(defvar-keymap woman-mode-map + :doc "Keymap for `woman-mode'." + :parent Man-mode-map + "R" #'woman-reformat-last-file + "w" #'woman + "M-n" #'WoMan-next-manpage + "M-p" #'WoMan-previous-manpage + "M-<mouse-2>" #'woman-follow-word + ;; We don't need to call `man' when we are in `woman-mode'. + "<remap> <man>" #'woman + "<remap> <man-follow>" #'woman-follow) (defun woman-follow (topic) "Get a Un*x manual page of the item under point and put it in a buffer." |