- (when (eq real-last-command 'mode-exit)
- (error "real-last-command is mode-exit & can't be repeated"))
- (when (memq real-last-command repeat-too-dangerous)
- (error "Command %S too dangerous to repeat automatically" real-last-command))
- (setq this-command real-last-command
- repeat-num-input-keys-at-repeat num-input-keys)
- (setq repeat-previous-repeated-command this-command)
+ ((eq last-repeatable-command 'mode-exit)
+ (error "last-repeatable-command is mode-exit & can't be repeated"))
+ ((memq last-repeatable-command repeat-too-dangerous)
+ (error "Command %S too dangerous to repeat automatically"
+ last-repeatable-command)))
+ (setq this-command last-repeatable-command
+ repeat-previous-repeated-command last-repeatable-command
+ repeat-num-input-keys-at-repeat num-input-keys)