Re: string-match and string-looking-at



Am Sat, 28 Aug 2010 19:26:43 -0600
schrieb Matthew Love <matth love gmail com>:

> Hi all,
> 
> I've noticed that 'string-match and 'string-looking-at both 
> return an error when one of the input strings is '(). 'string= 
> will return '() in such cases.  
> 
> It seems it would be better for 'string-match and 'string-looking-at to
> also return '() if one of the input "strings" is not actually a string,
> as in such cases the strings do not technically match.
> 
> What do you think?
> 
> I have attached a patch that will have 'string-match and
> 'string-looking-at return '() if one of the input strings is not a
> string. Im fairly new to c so im not sure if there is a better way 
> to do it.
> 
> Cheers.
> 

According to docs string-match and string-looking-at are only supposed to return t.
So the current behaviour is a bit odd. I've added an fprintf for some info.

Chris


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