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

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

RE: stack overflow with (re-search-forward "..." nil t)


From: Drew Adams
Subject: RE: stack overflow with (re-search-forward "..." nil t)
Date: Tue, 5 Jul 2005 14:57:00 -0700

    > I don't understand the `noerror' argument to
    re-search-forward, when it is
    > `t'. For some kinds of errors it works, but I still get stack-overflow
    > errors signaled, instead of the function returning nil. The
    doc string and
    > Elisp manual simply say that `noerror'=t returns nil in case of error.

    If you expect it should return nil even in the case of a bad argument,
    I don't think that was the intention.  In fact I'd be complaining if it
    did work that way.  A wrapper is definitely necessary to get that level
    of safety.

I realize now that it is the doc (in particular, Info) that is not clear
enough (for me). It should clearly state that it returns nil (for NOERROR=t)
when a match is not found, instead of saying that it does so when the
"function fails".





reply via email to

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