help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: re-search-forward hangs


From: Ben Bacarisse
Subject: Re: re-search-forward hangs
Date: Mon, 30 Jul 2018 15:36:16 +0100

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> emacs -Q, when evaluating from in scratch-buffer
>
> (while (re-search-forward "" nil t 1))
>
> Emacs hangs.
>
> Same with plain
>
> (while (search-forward "" nil t 1))
>
> Expect it terminating.

Why do you expect a difference?  I would expect both to loop
indefinitely (and they do in my slightly older Emacs).

> Are there reasons for this?

Both loop because the match always succeeds.  Neither match moves point
so neither can fail.

-- 
Ben.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]