]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/lisp/repeat-tests.el: Add a command for global continue.
authorJuri Linkov <juri@linkov.net>
Wed, 11 Jun 2025 06:43:45 +0000 (09:43 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 18 Jun 2025 08:08:08 +0000 (10:08 +0200)
(repeat-tests-call-g): New command (bug#78742).
Put 'repeat-continue' with t on this symbol.
(repeat-tests-global-map): Bind it to 'C-M-g'.
(repeat-tests-continue-another): Add 'C-M-g' that should continue.

(cherry picked from commit de2daa74bd5304364931fd19ad81a94f5f7d8d09)

test/lisp/repeat-tests.el

index 6bf9badf31d50dce036ab91b28ffba513ba40062..3f17978468ce5f0772762b1a5b0def69a7f5381f 100644 (file)
@@ -27,6 +27,7 @@
 ;; Key mnemonics: a - activate (enter, also b, s),
 ;;                c - continue (also d, t, also o, u),
 ;;                e - continue-only (not activate),
+;;                g - global continue,
 ;;                q - quit (exit)
 
 (defvar repeat-tests-calls nil)
   (interactive "p")
   (push `(,arg e) repeat-tests-calls))
 
+(defun repeat-tests-call-g (&optional arg)
+  (interactive "p")
+  (push `(,arg g) repeat-tests-calls))
+
 (defun repeat-tests-call-o (&optional arg)
   (interactive "p")
   (push `(,arg o) repeat-tests-calls))
@@ -78,6 +83,7 @@
   "C-M-a"   'repeat-tests-call-a
   "C-M-b"   'repeat-tests-call-b
   "C-M-e"   'repeat-tests-call-e
+  "C-M-g"   'repeat-tests-call-g
   "C-M-o"   'repeat-tests-call-o
   "C-M-s"   'repeat-tests-call-s
   "C-M-u"   'repeat-tests-call-u)
 ;; Test using a variable instead of the symbol:
 (put 'repeat-tests-call-b 'repeat-map repeat-tests-repeat-map)
 
+(put 'repeat-tests-call-g 'repeat-continue t)
+
 (defmacro with-repeat-mode (map &rest body)
   "Create environment for testing `repeat-mode'."
   (declare (indent 1) (debug (symbol body)))
   (with-repeat-mode repeat-tests-global-map
     (let ((repeat-echo-function 'ignore)
           (repeat-check-key nil))
+      ;; Global 'C-M-g' used as continue
+      (repeat-tests--check
+       "C-M-a c C-M-g c z"
+       '((1 a) (1 c) (1 g) (1 c)) "z")
       ;; 'C-M-e' and 'C-M-o' used as continue
       (repeat-tests--check
        "C-M-a c C-M-e C-M-o c z"