[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 43b81b7ecaf: Prefer defvar-keymap in two-column.el
From: |
Stefan Kangas |
Subject: |
master 43b81b7ecaf: Prefer defvar-keymap in two-column.el |
Date: |
Thu, 26 Dec 2024 23:38:00 -0500 (EST) |
branch: master
commit 43b81b7ecaf465eef268dd2cd94f00a0c4da87ea
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Prefer defvar-keymap in two-column.el
* lisp/textmodes/two-column.el (2C-mode-map, 2C-minor-mode-map):
Convert to defvar-keymap.
---
lisp/textmodes/two-column.el | 42 +++++++++++++++++++-----------------------
1 file changed, 19 insertions(+), 23 deletions(-)
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el
index 41cd82ce728..e4cbbbec95f 100644
--- a/lisp/textmodes/two-column.el
+++ b/lisp/textmodes/two-column.el
@@ -162,14 +162,12 @@ minus this value."
:type 'boolean)
-(defvar 2C-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "2" #'2C-two-columns)
- (define-key map [f2] #'2C-two-columns)
- (define-key map "b" #'2C-associate-buffer)
- (define-key map "s" #'2C-split)
- map)
- "Keymap for commands for setting up two-column mode.")
+(defvar-keymap 2C-mode-map
+ :doc "Keymap for commands for setting up two-column mode."
+ "2" #'2C-two-columns
+ "<f2>" #'2C-two-columns
+ "b" #'2C-associate-buffer
+ "s" #'2C-split)
;;;###autoload (autoload '2C-command "two-column" () t 'keymap)
(fset '2C-command 2C-mode-map)
@@ -177,21 +175,19 @@ minus this value."
;; This one is for historical reasons and simple keyboards, it is not
;; at all mnemonic. All usual sequences containing 2 were used, and
;; f2 could not be set up in a standard way under Emacs 18.
-;;;###autoload (global-set-key "\C-x6" #'2C-command)
-
-;;;###autoload (global-set-key [f2] #'2C-command)
-
-(defvar 2C-minor-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "1" #'2C-merge)
- (define-key map "d" #'2C-dissociate)
- (define-key map "o" #'2C-associated-buffer)
- (define-key map "\^m" #'2C-newline)
- (define-key map "|" #'2C-toggle-autoscroll)
- (define-key map "{" #'2C-shrink-window-horizontally)
- (define-key map "}" #'2C-enlarge-window-horizontally)
- map)
- "Keymap for commands for use in two-column mode.")
+;;;###autoload (keymap-global-set "C-x 6" #'2C-command)
+
+;;;###autoload (keymap-global-set "<f2>" #'2C-command)
+
+(defvar-keymap 2C-minor-mode-map
+ :doc "Keymap for commands for use in two-column mode."
+ "1" #'2C-merge
+ "d" #'2C-dissociate
+ "o" #'2C-associated-buffer
+ "RET" #'2C-newline
+ "|" #'2C-toggle-autoscroll
+ "{" #'2C-shrink-window-horizontally
+ "}" #'2C-enlarge-window-horizontally)
(setq minor-mode-map-alist
(cons (cons '2C-mode
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 43b81b7ecaf: Prefer defvar-keymap in two-column.el,
Stefan Kangas <=