Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change introduces an option which allows translated key bindings to avoid being repeated, to be used by Devil or by other packages where the Devil repeat map should not be activated.
Repeat suppression is configured by maintaining a list of functions which are treated as repeat suppression predicates. Interactive functions will not be repeated when their symbol is a list member. Non-interactive functions are called with the binding as the argument and should return a non-nil value when the repeat should be suppressed.
By default the predicate list contains the symbol devil--isearch-suppress-repeat-p which suppresses the repeat of isearch-forward while the isearch specific mode map is not active. This fixes initiating an isearch with the default list of repeatable keys and trying to enter the letter 's' as the search criteria.
I have ended up with this solution as a way to fix problems I was having with C-s being repeated after the isearch search is activated, i.e. it didn't seem possible to enter a search string which began with the letter 's'. I'm not particularly sure on how efficient the test of the active keymap is, but I've not noticed any issues with it so far.
There may be other solutions or more efficient ways to solve this particular problem, but using the list of predicates would also allow other packages to opt their key presses out of being repeated where the activation of the repeat map is problematic.