[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 69facd33a80 3/3: Rename the property 'repeat-continue-only' to 'r
From: |
Juri Linkov |
Subject: |
master 69facd33a80 3/3: Rename the property 'repeat-continue-only' to 'repeat-continue' |
Date: |
Tue, 17 Dec 2024 13:59:45 -0500 (EST) |
branch: master
commit 69facd33a80bee3f49b0518e75e8ec570978334c
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
Rename the property 'repeat-continue-only' to 'repeat-continue'
* doc/lispref/keymaps.texi (Creating Keymaps):
* lisp/keymap.el (defvar-keymap):
* lisp/repeat.el (repeat-get-map, describe-repeat-maps):
* test/lisp/repeat-tests.el (repeat-tests-another-repeat-map)
(repeat-tests-repeat-map): Replace 'repeat-continue-only'
with 'repeat-continue' (bug#74140).
---
doc/lispref/keymaps.texi | 4 ++--
etc/NEWS | 4 ++--
lisp/keymap.el | 10 +++++-----
lisp/repeat.el | 10 +++++-----
test/lisp/repeat-tests.el | 22 +++++++++++-----------
5 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 87723720b1e..4b900e3a30d 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -481,7 +481,7 @@ This means all the commands in the keymap are repeatable,
and is the
most common usage.
@item (:enter (commands ...) :exit (commands ...)
-@itemx :continue-only (commands ...) :hints ((command . "hint") ...))
+@itemx :continue (commands ...) :hints ((command . "hint") ...))
This specifies that the commands in the @code{:enter} list enter
@code{repeat-mode}, and the commands in the @code{:exit} list exit
repeat mode.
@@ -496,7 +496,7 @@ If the @code{:exit} list is empty then no commands in the
map exit
useful if the keymap being defined contains a command that should not
have the @code{repeat-map} property.
-The @code{:continue-only'} list specifies the commands that should not
+The @code{:continue} list specifies the commands that should not
enter @code{repeat-mode}. These command should only continue the
already activated repeating sequence.
diff --git a/etc/NEWS b/etc/NEWS
index 4f046c59d65..d686bd78667 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1010,11 +1010,11 @@ widths can be determined. Columns widths can be set
explicitly, or they
will be calculated based on the window width.
+++
-** New symbol property 'repeat-continue-only' for 'repeat-mode'.
+** New symbol property 'repeat-continue' for 'repeat-mode'.
A command with this symbol property whose value is a list of repeat
maps will not activate the repeat map in 'repeat-mode'. It will only
continue the already activated repeating sequence. Also 'defvar-keymap'
-supports a new keyword ':continue-only' with a list of commands that
+supports a new keyword ':continue' with a list of commands that
only continue the active repeating sequence.
** New function 'completion-table-with-metadata'.
diff --git a/lisp/keymap.el b/lisp/keymap.el
index 43c8d918ba7..a6edead0ccf 100644
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -687,7 +687,7 @@ value can also be a property list with properties `:enter',
`:exit' and `:hints', for example:
:repeat (:enter (commands ...) :exit (commands ...)
- :continue-only (commands ...)
+ :continue (commands ...)
:hints ((command . \"hint\") ...))
`:enter' specifies the list of additional commands that only
@@ -703,7 +703,7 @@ Specifying a list of commands is useful when those commands
exist
in this specific map, but should not have the `repeat-map' symbol
property.
-`:continue-only' specifies the list of commands that should not
+`:continue' specifies the list of commands that should not
enter `repeat-mode'. These command should only continue the
already activated repeating sequence.
@@ -745,9 +745,9 @@ in the echo area.
def)
(dolist (def (plist-get repeat :enter))
(push `(put ',def 'repeat-map ',variable-name) props))
- (dolist (def (plist-get repeat :continue-only))
- (push `(put ',def 'repeat-continue-only
- (cons ',variable-name (get ',def 'repeat-continue-only)))
+ (dolist (def (plist-get repeat :continue))
+ (push `(put ',def 'repeat-continue
+ (cons ',variable-name (get ',def 'repeat-continue)))
props))
(while defs
(pop defs)
diff --git a/lisp/repeat.el b/lisp/repeat.el
index a114dc2c88b..901feae5cc8 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -457,11 +457,11 @@ See `describe-repeat-maps' for a list of all repeatable
commands."
"Return a transient map for keys repeatable after the current command."
(when repeat-mode
(let ((rep-map (or rep-map repeat-map (repeat--command-property
'repeat-map)))
- (continue-only (repeat--command-property 'repeat-continue-only)))
- (when continue-only
+ (continue (repeat--command-property 'repeat-continue)))
+ (when continue
(if repeat-in-progress
- (when (and (consp continue-only)
- (memq repeat-in-progress continue-only))
+ (when (and (consp continue)
+ (memq repeat-in-progress continue))
(setq rep-map repeat-in-progress))
(setq rep-map nil)))
(when rep-map
@@ -661,7 +661,7 @@ Click on a keymap to see the commands repeatable by the
keymap.\n")
(setq map-commands (seq-uniq map-commands))
(setq commands-continue
(seq-filter (lambda (s) (memq (car keymap)
- (get s
'repeat-continue-only)))
+ (get s 'repeat-continue)))
map-commands))
(setq commands-enter
(seq-difference repeat-commands map-commands))
diff --git a/test/lisp/repeat-tests.el b/test/lisp/repeat-tests.el
index 4039a84c4d3..4f45378c520 100644
--- a/test/lisp/repeat-tests.el
+++ b/test/lisp/repeat-tests.el
@@ -77,9 +77,9 @@
(defvar-keymap repeat-tests-another-repeat-map
:doc "Keymap for repeating other sequences."
- :repeat ( :enter (repeat-tests-call-s)
- :continue-only (repeat-tests-call-o
- repeat-tests-call-u))
+ :repeat ( :enter (repeat-tests-call-s)
+ :continue (repeat-tests-call-o
+ repeat-tests-call-u))
"s" 'ignore ;; for non-nil repeat-check-key only
"t" 'repeat-tests-call-t
"C-M-o" 'repeat-tests-call-o
@@ -87,9 +87,9 @@
(defvar-keymap repeat-tests-repeat-map
:doc "Keymap for repeating sequences."
- :repeat ( :enter (repeat-tests-call-a)
- :continue-only (repeat-tests-call-o)
- :exit (repeat-tests-call-q))
+ :repeat ( :enter (repeat-tests-call-a)
+ :continue (repeat-tests-call-o)
+ :exit (repeat-tests-call-q))
"a" 'ignore ;; for non-nil repeat-check-key only
"c" 'repeat-tests-call-c
"d" 'repeat-tests-call-d
@@ -202,11 +202,11 @@
;; TODO: :tags '(:expensive-test) for repeat-exit-timeout
-(ert-deftest repeat-tests-continue-only ()
+(ert-deftest repeat-tests-continue ()
(with-repeat-mode repeat-tests-global-map
(let ((repeat-echo-function 'ignore)
(repeat-check-key nil))
- ;; 'C-M-o' used as continue-only
+ ;; 'C-M-o' used as continue
(repeat-tests--check
"C-M-a c C-M-o c z"
'((1 a) (1 c) (1 o) (1 c)) "z")
@@ -223,7 +223,7 @@
(repeat-tests--check
"C-M-s t t z"
'((1 s) (1 t) (1 t)) "z")
- ;; 'C-M-u' used as continue-only
+ ;; 'C-M-u' used as continue
(repeat-tests--check
"C-M-s t C-M-u t z"
'((1 s) (1 t) (1 u) (1 t)) "z")
@@ -268,7 +268,7 @@
:repeat-map repeat-tests-bind-keys-repeat-map
:continue
("c" . repeat-tests-bind-call-c)
- ;; :continue-only
+ ;; :continue
("C-M-o" . repeat-tests-bind-call-o)
:exit
("q" . repeat-tests-bind-call-q))
@@ -279,7 +279,7 @@
(with-repeat-mode repeat-tests-bind-keys-map
(let ((repeat-echo-function 'ignore)
(repeat-check-key nil))
- ;; 'C-M-o' used as continue-only
+ ;; 'C-M-o' used as continue
(repeat-tests--check
"C-M-a c C-M-o c z"
'((1 a) (1 c) (1 o) (1 c)) "z")