>> Thanks for pointing out the case when the command is bound to the same key >> globally and in the repeat map. So checking for a key can't help here. >> >> Therefore, I implemented another solution in repeat.el. There is now >> a new symbol property 'repeat-continue-only'. And a command with this >> symbol property will not activate the repeat map, but will only continue >> the already activated repeating sequence. This is implemented by >> a simple change: >> >> (when (and (repeat-check-map map) >> (or (null (repeat--command-property 'repeat-continue-only)) >> was-in-progress)) >> > > Thanks, I took a look. One disadvantage of this approach is that it > does not allow the same command to enter one repeat map and continue > another. I'll confess that I'm not aware of any such examples in my > config, but it still seems like an undesirable "non-local" effect. Other existing properties such as 'repeat-exit-timeout' or 'repeat-check-key' don't accept a list of repeat maps, but only a non-nil value (including the special symbol :no). However, this can be changed gradually by adding support for the list to them. So below is a patch that adds support for a list of maps. And users don't have to populate the list manually because 'defvar-keymap' does this automatically with :continue-only in the same patch. > This issue motivated my suggestion that the symbol property should be a > list of repeat maps that the command continues, although I haven't > considered the details (e.g., concerning the map vs. the symbol that > points to it) - maybe you have a clearer picture of those. Using a variable value for the map property is supported but not encouraged. There are too many problems when not using a symbol. So let's support only symbols in the list of repeat maps for :continue-only. >> BTW, while writing the 'bind-keys' test, I noticed there is no way >> to specify a command that only activates, but not continues >> (the same as :entry in 'defvar-keymap'). Is it true that 'bind-keys' >> has no such keyword, so there is a need to do this explicitly with: >> >> (put 'repeat-tests-bind-call-a 'repeat-map 'repeat-tests-bind-keys-repeat-map) > > Yes, that's also my understanding (but it's not clear to me that it > requires such a keyword if its purpose is to bind keys in a map). My goal was to write the same test for 'bind-keys' as for 'defvar-keymap' in test/lisp/repeat-tests.el: (bind-keys :map repeat-tests-bind-keys-map ("C-M-a" . repeat-tests-bind-call-a) ("C-M-o" . repeat-tests-bind-call-o) :repeat-map repeat-tests-bind-keys-repeat-map :continue ("c" . repeat-tests-bind-call-c) :continue-only ("C-M-o" . repeat-tests-bind-call-o) :exit ("q" . repeat-tests-bind-call-q)) But I can't find a way to do the same what the :enter key does in 'defvar-keymap', so needed to set the symbol explicitly: (put 'repeat-tests-bind-call-a 'repeat-map 'repeat-tests-bind-keys-repeat-map)