1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Add new keyword :continue-only to defvar-keymap for repeat-mode (bug#74140)

* doc/lispref/keymaps.texi (Creating Keymaps): Add :continue-only
to :repeat part of defvar-keymap.

* lisp/keymap.el (defvar-keymap): Add support for new :repeat
keyword :continue-only.

* lisp/repeat.el (repeat-post-hook): The property 'repeat-continue-only'
is handled as a list of repeat-maps.

* test/lisp/repeat-tests.el (repeat-tests-repeat-map): Use new
:repeat keyword :continue-only.
This commit is contained in:
Juri Linkov 2024-12-03 20:12:03 +02:00
parent 9f266e2d7c
commit 69e1f78752
5 changed files with 31 additions and 13 deletions

View file

@ -505,8 +505,12 @@ See `describe-repeat-maps' for a list of all repeatable commands."
(setq repeat-in-progress nil)
(let ((map (repeat-get-map)))
(when (and (repeat-check-map map)
(or (null (repeat--command-property 'repeat-continue-only))
was-in-progress))
(let ((continue-only (repeat--command-property 'repeat-continue-only)))
(or (null continue-only)
(and (or (not (consp continue-only))
(memq (repeat--command-property 'repeat-map)
continue-only))
was-in-progress))))
;; Messaging
(funcall repeat-echo-function map)