|
From: | Juri Linkov |
Subject: | bug#50176: [PATCH] 28.0.50; repeat-mode does not clear echo-area after timeout |
Date: | Tue, 24 Aug 2021 21:20:13 +0300 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> 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.
[Prev in Thread] | Current Thread | [Next in Thread] |