;; 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))
"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"