aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2023-02-13 20:12:32 +0200
committerEli Zaretskii2023-02-13 20:12:32 +0200
commit13bcff3da5ccd1dced73f001e2a18829029507ff (patch)
tree4df547b98055cfbf5dc7c63976b4e299eb4a6733
parent3d572ae0d507bba07f3cfc5ae2d2c7dd4937472c (diff)
parentd806b0e33cf9dcc108b932226e84eaa0b6378eb9 (diff)
downloademacs-13bcff3da5ccd1dced73f001e2a18829029507ff.tar.gz
emacs-13bcff3da5ccd1dced73f001e2a18829029507ff.zip
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
-rw-r--r--lisp/repeat.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/repeat.el b/lisp/repeat.el
index 37d4aaec985..2fcac4d2ce3 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -359,8 +359,8 @@ This property can override the value of this variable."
359 :group 'repeat 359 :group 'repeat
360 :version "28.1") 360 :version "28.1")
361 361
362(defvar repeat-exit-function nil 362(defvar repeat--transient-exitfun nil
363 "Function that exits the repeating sequence.") 363 "Function returned by `set-transient-map'.")
364 364
365(defvar repeat-exit-timer nil 365(defvar repeat-exit-timer nil
366 "Timer activated after the last key typed in the repeating key sequence.") 366 "Timer activated after the last key typed in the repeating key sequence.")
@@ -517,9 +517,9 @@ See `describe-repeat-maps' for a list of all repeatable commands."
517 'ignore)) 517 'ignore))
518 518
519 (setq repeat-in-progress t) 519 (setq repeat-in-progress t)
520 (repeat--exit) 520 (repeat--clear-prev)
521 (let ((exitfun (set-transient-map map))) 521 (let ((exitfun (set-transient-map map)))
522 (setq repeat-exit-function exitfun) 522 (setq repeat--transient-exitfun exitfun)
523 523
524 (let* ((prop (repeat--command-property 'repeat-exit-timeout)) 524 (let* ((prop (repeat--command-property 'repeat-exit-timeout))
525 (timeout (unless (eq prop 'no) (or prop repeat-exit-timeout)))) 525 (timeout (unless (eq prop 'no) (or prop repeat-exit-timeout))))
@@ -538,17 +538,17 @@ See `describe-repeat-maps' for a list of all repeatable commands."
538This function can be used to force exit of repetition while it's active." 538This function can be used to force exit of repetition while it's active."
539 (interactive) 539 (interactive)
540 (setq repeat-in-progress nil) 540 (setq repeat-in-progress nil)
541 (repeat--exit) 541 (repeat--clear-prev)
542 (funcall repeat-echo-function nil)) 542 (funcall repeat-echo-function nil))
543 543
544(defun repeat--exit () 544(defun repeat--clear-prev ()
545 "Internal function to clean up previously set exit function and timer." 545 "Internal function to clean up previously set exit function and timer."
546 (when repeat-exit-timer 546 (when repeat-exit-timer
547 (cancel-timer repeat-exit-timer) 547 (cancel-timer repeat-exit-timer)
548 (setq repeat-exit-timer nil)) 548 (setq repeat-exit-timer nil))
549 (when repeat-exit-function 549 (when repeat--transient-exitfun
550 (funcall repeat-exit-function) 550 (funcall repeat--transient-exitfun)
551 (setq repeat-exit-function nil))) 551 (setq repeat--transient-exitfun nil)))
552 552
553(defun repeat-echo-message-string (keymap) 553(defun repeat-echo-message-string (keymap)
554 "Return a string with the list of repeating keys in KEYMAP." 554 "Return a string with the list of repeating keys in KEYMAP."