[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3b0296c8b0: Prefer defvar-keymap in page-ext.el
From: |
Stefan Kangas |
Subject: |
master 3b0296c8b0: Prefer defvar-keymap in page-ext.el |
Date: |
Fri, 28 Oct 2022 22:04:00 -0400 (EDT) |
branch: master
commit 3b0296c8b03436c7848009ca0238b1126dc3bac7
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Prefer defvar-keymap in page-ext.el
* lisp/textmodes/page-ext.el (pages--ctl-x-ctl-p-map)
(pages-directory-mode-map): Prefer defvar-keymap.
---
lisp/textmodes/page-ext.el | 38 +++++++++++++++++---------------------
1 file changed, 17 insertions(+), 21 deletions(-)
diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el
index 05c02308e5..b133b1e9e3 100644
--- a/lisp/textmodes/page-ext.el
+++ b/lisp/textmodes/page-ext.el
@@ -276,19 +276,17 @@ Used by `pages-directory-for-addresses' function."
;;; Key bindings for page handling functions
-(defvar pages--ctl-x-ctl-p-map
- (let ((map (make-sparse-keymap)))
- (define-key map "\C-n" #'pages-next-page)
- (define-key map "\C-p" #'pages-previous-page)
- (define-key map "\C-a" #'pages-add-new-page)
- (define-key map "\C-m" #'mark-page)
- (define-key map "\C-s" #'pages-search)
- (define-key map "s" #'pages-sort-buffer)
- (define-key map "\C-l" #'pages-set-delimiter)
- (define-key map "\C-d" #'pages-directory)
- (define-key map "d" #'pages-directory-for-addresses)
- map)
- "Keymap for subcommands of C-x C-p, which are for page handling.")
+(defvar-keymap pages--ctl-x-ctl-p-map
+ :doc "Keymap for subcommands of \\`C-x C-p', which are for page handling."
+ "C-n" #'pages-next-page
+ "C-p" #'pages-previous-page
+ "C-a" #'pages-add-new-page
+ "C-m" #'mark-page
+ "C-s" #'pages-search
+ "s" #'pages-sort-buffer
+ "C-l" #'pages-set-delimiter
+ "C-d" #'pages-directory
+ "d" #'pages-directory-for-addresses)
;; FIXME: Merely loading a package shouldn't have this kind of side-effects!
(global-unset-key "\C-x\C-p")
@@ -476,14 +474,12 @@ contain matches to the regexp.)")
(define-obsolete-variable-alias 'pages-directory-map
'pages-directory-mode-map "26.1")
-(defvar pages-directory-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "\C-c\C-c" #'pages-directory-goto)
- (define-key map "\C-m" #'pages-directory-goto)
- (define-key map "\C-c\C-p\C-a" #'pages-add-new-page)
- (define-key map [mouse-2] #'pages-directory-goto)
- map)
- "Keymap for the pages-directory-buffer.")
+(defvar-keymap pages-directory-mode-map
+ :doc "Keymap for the pages-directory-buffer."
+ "C-c C-c" #'pages-directory-goto
+ "RET" #'pages-directory-goto
+ "C-c C-p C-a" #'pages-add-new-page
+ "<mouse-2>" #'pages-directory-goto)
(defvar pages-original-delimiter "^\f"
"Default page delimiter.")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 3b0296c8b0: Prefer defvar-keymap in page-ext.el,
Stefan Kangas <=