Juri Linkov writes: > > Thanks for the patch. This is a known problem without a good solution. > But your patch handles the case much better than before, so pushed now. Thank you, Juri Perhaps we could store in a defvar the last message echoed by repeat-mode to make easier this check? Today I caught a small problem with the patch I sent. The 'string-prefix-p' and 'string-match-p' handle nil inputs differently: (string-prefix-p "Repeat with " nil) ;; returns nil (string-match-p "Repeat with " nil) ;; throws an error The problem can be reproduced by writing some elisp code in *scratch* buffer, putting the cursor in the function definition and invoking the 'other-window' with 'repeat-mode' using my original steps. The 'eldoc-mode' will echo the function name and '(current-message)' will return nil. A simple patch: