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

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

Question on re-search-forward and infinite loop


From: David Maus
Subject: Question on re-search-forward and infinite loop
Date: Thu, 26 Nov 2009 22:01:04 +0100
User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj┼Ź) APEL/10.7 Emacs/23.1.50 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi,

By accident I stumpled on a way to force Emacs in a infinite loop with
`re-search-forward'.

If I create a shiny new buffer, insert something like this:

,----
| (while (re-search-forward "^[ \t]*"))
| Something else
`----

 -- go back beyond the while-clause and evaluate it, Emacs enters an
    infinite loop. As far as I was able to find out
    `re-search-forward' with this regexp moves point to the beginning
    of the next line above the "S" of "Something else" and stays there
    forever so it never reaches end-of-buffer.

As I dunno much (or better: anything) on Emacs' interiors my question
is: Why does this happen? 

Regards,

  -- David

-- 
OpenPGP... 0x316F4BE4670716FD
Jabber.... address@hidden
Email..... address@hidden
ICQ....... 241051416




reply via email to

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