[PATCH] Re: [V] Fix search assertion failure

Stephen J. Turnbull stephen at xemacs.org
Wed Feb 13 13:02:44 EST 2008


Stephen J. Turnbull writes:

 >  > The below patch fails immediately when it encounters characters in the
 >  > search string that are not possible in the buffer, and avoids this
 >  > assertion.
 > 
 > By that you mean no search is executed but you return failure?  That
 > can't work because there's no a priori way to know what characters are
 > in the buffer AFAIK.

Conjecture that something is not right is confirmed; the "success"
test I suggested fails with your patch in the build.

 >  > +(with-temp-buffer
 >  > +  (Assert (search-forward "M\xe9zard" nil t)))
 > 
 > Shouldn't this be
 > 
 >   (with-temp-buffer
 >     (Assert (not (search-forward "M\xe9zard" nil t))))
 > 
 > since `search-forward' should return nil for any non-degenerate search
 > in an empty buffer?

Conjecture is confirmed: your test fails, the negation succeeds with
your patch in the build.



More information about the XEmacs-Patches mailing list