Subject: bug#50176: [PATCH] 28.0.50; repeat-mode does not clear echo-area after timeout

From: Juri Linkov <[email-masked]>
Date: Tue, 24 Aug 2021 21:20:13 +0300

> 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.

Please look in the repo that Mattias already changed string-match-p
to string-search.  But (string-search "Repeat with " nil)
still throws an error.  I wonder why string-search is different
from string-prefix-p is its argument handling?
They both operate on the strings.

Also the name 'string-search' is too confusing since
it is too similar to 'search-forward' that searches
in the buffer.