Subject: Re: bug#7267: 23.1; regexp backslash-B matches word

From: "Thibault Kruse" <[email-masked]>
Date: Sat, 23 Oct 2010 11:00:44 +0200

sorry, I misunderstood. But I now understand it means it always returns t except for the noted cases, as any string contains the empty string.

-------- Original-Nachricht --------
> Datum: Fri, 22 Oct 2010 22:49:27 -0400
> Von: Glenn Morris <[email-masked]>
> An: "Thibault Kruse" <[email-masked]>
> CC: [email-masked]
> Betreff: Re: bug#7267: 23.1; regexp backslash-B matches word

> "Thibault Kruse" wrote:
> 
> > According to emacs manual, \B matches the empty string, but it does not.
> 
> The elisp manual says:
> 
> Backslash Constructs in Regular Expressions
> [...]
> 
> `\B'
>      matches the empty string, but _not_ at the beginning or end of a
>      word, nor at the beginning or end of the buffer (or string).
> 
> > start emacs with emacs -q --no-site-file
> > move point over word in the splash screen.
> > M-:
> > (looking-at "\\B")
> > minibuffer says: T, should say nil
> 
> Why do you think it should return nil?
> 
> This construct matches the empty string inside words.
> It only returns nil at word boundaries. Try
> 
> (looking-at "\\B")
> 
> with point at the start, middle, and end of a word.
> It returns nil, t, nil, as it should.
> 
> The empty string is _empty_, ie length zero, not whitespace or
> anything like that.
> 

-- 
GRATIS! Movie-FLAT mit über 300 Videos. 
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome