GNU bug report logs -
#74140
[PATCH] Add :continue-only directive for repeat maps in bind-keys, use-package
Previous Next
Reported by: Paul Nelson <ultrono <at> gmail.com>
Date: Thu, 31 Oct 2024 17:37:02 UTC
Severity: wishlist
Tags: patch
Fixed in version 31.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #40 received at 74140 <at> debbugs.gnu.org (full text, mbox):
> 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.
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.
> 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).
This bug report was last modified 141 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.