summaryrefslogtreecommitdiff
path: root/lisp/mail/footnote.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-08-03 00:48:07 +0200
committerStefan Kangas <stefan@marxist.se>2022-08-03 01:15:59 +0200
commite1553142fefaf39d4742d1a161de2bce691204b2 (patch)
tree7ea67a06cff6a9027fce65735ae5439fbb178609 /lisp/mail/footnote.el
parent39aa623479128b465b01490845f0781c03eece8d (diff)
downloademacs-e1553142fefaf39d4742d1a161de2bce691204b2.tar.gz
emacs-e1553142fefaf39d4742d1a161de2bce691204b2.tar.bz2
emacs-e1553142fefaf39d4742d1a161de2bce691204b2.zip
Prefer defvar-keymap in footnote.el
* lisp/mail/footnote.el (footnote-mode-map) (footnote-minor-mode-map): Prefer defvar-keymap.
Diffstat (limited to 'lisp/mail/footnote.el')
-rw-r--r--lisp/mail/footnote.el29
1 files changed, 12 insertions, 17 deletions
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el
index ab29a160963..a594fa3ccb4 100644
--- a/lisp/mail/footnote.el
+++ b/lisp/mail/footnote.el
@@ -840,22 +840,18 @@ being set it is automatically widened."
(when (looking-at (footnote--current-regexp))
(goto-char (match-end 0))))))
-(defvar footnote-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "a" #'footnote-add-footnote)
- (define-key map "b" #'footnote-back-to-message)
- (define-key map "c" #'footnote-cycle-style)
- (define-key map "d" #'footnote-delete-footnote)
- (define-key map "g" #'footnote-goto-footnote)
- (define-key map "r" #'footnote-renumber-footnotes)
- (define-key map "s" #'footnote-set-style)
- map))
-
-(defvar footnote-minor-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map footnote-prefix footnote-mode-map)
- map)
- "Keymap used for binding footnote minor mode.")
+(defvar-keymap footnote-mode-map
+ "a" #'footnote-add-footnote
+ "b" #'footnote-back-to-message
+ "c" #'footnote-cycle-style
+ "d" #'footnote-delete-footnote
+ "g" #'footnote-goto-footnote
+ "r" #'footnote-renumber-footnotes
+ "s" #'footnote-set-style)
+
+(defvar-keymap footnote-minor-mode-map
+ :doc "Keymap used for binding footnote minor mode."
+ (key-description footnote-prefix) footnote-mode-map)
(defmacro footnote--local-advice (mode variable function)
"Add advice to a variable holding buffer-local functions.
@@ -889,7 +885,6 @@ play around with the following keys:
(footnote--local-advice footnote-mode fill-paragraph-function
footnote--fill-paragraph)
(when footnote-mode
- ;; (footnote-setup-keybindings)
(make-local-variable 'footnote-style)
(make-local-variable 'footnote-body-tag-spacing)
(make-local-variable 'footnote-spaced-footnotes)