]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename the property 'repeat-continue-only' to 'repeat-continue'
authorJuri Linkov <juri@linkov.net>
Tue, 17 Dec 2024 18:58:09 +0000 (20:58 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 15:12:13 +0000 (16:12 +0100)
* 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).

(cherry picked from commit 69facd33a80bee3f49b0518e75e8ec570978334c)

doc/lispref/keymaps.texi
etc/NEWS
lisp/keymap.el
lisp/repeat.el
test/lisp/repeat-tests.el

index 87723720b1e21325221586b377b58ecfb90f1bfb..4b900e3a30d65c9c365d773634f22d1cd7773b6f 100644 (file)
@@ -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.
 
index 41e53b24105939d3c064dbcc1877679f3e933aa7..ba7a6eacadbd7366e670348f679c5e883e2809e9 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -867,11 +867,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'.
index 4cb4d40635cf26de5efb17730e2248626a67decf..b2dcc98788d377bcd9a14e33f4b42dedd00c74a1 100644 (file)
@@ -679,7 +679,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
@@ -695,7 +695,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.
 
@@ -737,9 +737,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)
index df0eeaecc1acc7fa36e68ebf15bf7347ea285e4d..6456e6b2203cfa9b7e2ea0b2c92b4a1575c1aea7 100644 (file)
@@ -455,11 +455,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
@@ -662,7 +662,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))
index 4039a84c4d390e5d3e65572d9ebaf2cede28c357..4f45378c5206ad42b9fe39ea850ccf47c538e88e 100644 (file)
@@ -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
 
 ;; 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")
       (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")
    :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))
   (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")