Subject: bug#74140: [PATCH] Add :continue-only directive for repeat maps in bind-keys, use-package

From: Paul Nelson <[email-masked]>
Date: Mon, 16 Dec 2024 21:01:57 +0100

Juri Linkov <[email-masked]> writes:

>
> When I tried to evaluate your repeat-maps, I see that
> the 'repeat-continue-only' property is already a list:
>
>   (symbol-plist 'undo)
>   => (repeat-map repeat-paragraph-map
>       repeat-continue-only (repeat-paragraph-map repeat-list-map))
>
> Maybe the problem is that currently the 'repeat-map' property
> is not a list?

I think the repeat-map property is fine as is, but the logic should be a
bit different:

- If a command is called while repeat map MAP is active, then:

  - If the command's repeat-continue-only property contains MAP, then
    MAP remains active (i.e., that map "continues").  [Maybe a better
    name for the property would be simply "repeat-continue".]

  - Otherwise, if the command has a repeat-map property, then that
    becomes the new repeat map.

  - Otherwise, the repeat map deactivates.

- If a command is called while no repeat map is active, then we proceed
  as before.

Do you agree that this is the desired behavior?  The difference is that
with the current implementation, only the repeat-map property is
relevant for determining which repeat map a command activates or
continues.