From: Juri Linkov Date: Wed, 11 Jun 2025 06:43:45 +0000 (+0300) Subject: * test/lisp/repeat-tests.el: Add a command for global continue. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cfd7fcbb1c977286eb36796cd28ce299901bf4f2;p=emacs.git * test/lisp/repeat-tests.el: Add a command for global continue. (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) --- diff --git a/test/lisp/repeat-tests.el b/test/lisp/repeat-tests.el index 6bf9badf31d..3f17978468c 100644 --- a/test/lisp/repeat-tests.el +++ b/test/lisp/repeat-tests.el @@ -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) @@ -51,6 +52,10 @@ (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) @@ -108,6 +114,8 @@ ;; 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))) @@ -215,6 +223,10 @@ (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"