Variable: repeat-check-key

repeat-check-key is a customizable variable defined in repeat.el.gz.

Value

t

Documentation

Whether to check that the last key exists in the repeat map.

When non-nil and the last typed key (with or without modifiers) doesn't exist in the keymap attached by the repeat-map property, then don't activate that keymap for the next command. So only the same keys among repeatable keys are allowed in the repeating sequence. For example, with a non-nil value, only C-x u u repeats undo, whereas C-/ u doesn't.

You can also set the property repeat-check-key(var)/repeat-check-key(fun) on the command symbol. This property can override the value of this variable. When the variable value is non-nil, but the property value is no, then don't check the last key. Also when the variable value is nil, but the property value is t, then check the last key.

This variable was added, or its default value changed, in Emacs 28.1.

Source Code

;; Defined in /usr/src/emacs/lisp/repeat.el.gz
(defcustom repeat-check-key t
  "Whether to check that the last key exists in the repeat map.
When non-nil and the last typed key (with or without modifiers)
doesn't exist in the keymap attached by the `repeat-map' property,
then don't activate that keymap for the next command.  So only the
same keys among repeatable keys are allowed in the repeating sequence.
For example, with a non-nil value, only `C-x u u' repeats undo,
whereas `C-/ u' doesn't.

You can also set the property `repeat-check-key' on the command symbol.
This property can override the value of this variable.
When the variable value is non-nil, but the property value is `no',
then don't check the last key.  Also when the variable value is nil,
but the property value is `t', then check the last key."
  :type 'boolean
  :group 'convenience
  :version "28.1")