Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
On 30.07.2018 16:33, Eli Zaretskii wrote:
From: Andreas Röhler <andreas.roehler@easy-emacs.de>
Date: Mon, 30 Jul 2018 14:24:06 +0200
(while (re-search-forward "" nil t 1))
Emacs hangs.
Same with plain
(while (search-forward "" nil t 1))
Expect it terminating.
Are there reasons for this?
Why did you expect it to terminate?
Expect a call of search-forward from EOB not being successful.
I see. But searching for the empty string seems to be an always
successful operation as long as you have a string. The empty string is
before or after any character in a string, so I would expect it to be
always found by {re-}search-forward.