[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 53dba32022: Prefer defvar-keymap to easy-mmode-defmap
From: |
Stefan Kangas |
Subject: |
master 53dba32022: Prefer defvar-keymap to easy-mmode-defmap |
Date: |
Thu, 13 Jan 2022 17:25:36 -0500 (EST) |
branch: master
commit 53dba3202205b5fab078a47da77be4140b7f93b1
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
Prefer defvar-keymap to easy-mmode-defmap
* lisp/progmodes/gud.el (gud-minibuffer-local-map):
* lisp/vc/pcvs-info.el (cvs-status-map): Use defvar-keymap.
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-defmap): Document as
deprecated.
---
lisp/emacs-lisp/easy-mmode.el | 6 +++++-
lisp/progmodes/gud.el | 8 ++++----
lisp/vc/pcvs-info.el | 6 +++---
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index cf3ea8c3dd..688c76e0c5 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -696,7 +696,11 @@ Valid keywords and arguments are:
(defmacro easy-mmode-defmap (m bs doc &rest args)
"Define a constant M whose value is the result of `easy-mmode-define-keymap'.
The M, BS, and ARGS arguments are as per that function. DOC is
-the constant's documentation."
+the constant's documentation.
+
+This macro is deprecated; use `defvar-keymap' instead."
+ ;; FIXME: Declare obsolete in favor of `defvar-keymap'. It is still
+ ;; used for `gud-menu-map' and `gud-minor-mode-map', so fix that first.
(declare (doc-string 3) (indent 1))
`(defconst ,m
(easy-mmode-define-keymap ,bs nil (if (boundp ',m) ,m) ,(cons 'list args))
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index b1bef82842..3f78c9eb15 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -744,10 +744,10 @@ The option \"--fullname\" must be included in this value."
output))
-(easy-mmode-defmap gud-minibuffer-local-map
- '(("\C-i" . comint-dynamic-complete-filename))
- "Keymap for minibuffer prompting of gud startup command."
- :inherit minibuffer-local-map)
+(defvar-keymap gud-minibuffer-local-map
+ :doc "Keymap for minibuffer prompting of gud startup command."
+ :parent minibuffer-local-map
+ "C-i" #'comint-dynamic-complete-filename)
(defun gud-query-cmdline (minor-mode &optional init)
(let* ((hist-sym (gud-symbol 'history nil minor-mode))
diff --git a/lisp/vc/pcvs-info.el b/lisp/vc/pcvs-info.el
index 11d14f9576..141854a636 100644
--- a/lisp/vc/pcvs-info.el
+++ b/lisp/vc/pcvs-info.el
@@ -130,9 +130,9 @@ to confuse some users sometimes."
(defvar cvs-bakprefix ".#"
"The prefix that CVS prepends to files when rcsmerge'ing.")
-(easy-mmode-defmap cvs-status-map
- '(([(mouse-2)] . cvs-mode-toggle-mark))
- "Local keymap for text properties of status.")
+(defvar-keymap cvs-status-map
+ :doc "Local keymap for text properties of status."
+ "<mouse-2>" #'cvs-mode-toggle-mark)
;; Constructor:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 53dba32022: Prefer defvar-keymap to easy-mmode-defmap,
Stefan Kangas <=