[Top][All Lists]

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

Re: Strange behavior of word isearch

From: Stefan Monnier
Subject: Re: Strange behavior of word isearch
Date: Thu, 25 Sep 2008 09:35:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> The trouble here is that word-search-forward appends a \b regexp
> condition to the end of the search string, so it does not treat "learn"
> as a match for "l".

> Is this behavior useful in practice?  If not, the following patch
> removes the \b condition, which is an incompatible change to the
> behavior of word-search-forward.

> In other words, previously a word search for "foo" is a regexp search
> for "\bfoo\b"; this patch changes the search to "\bfoo".

> Or, it may be safer to either introduce a function that is similar to
> word-search-forward but without the \b condition, or a variable that
> turns that behavior off; and use that in isearch.

> What do people think?

I obviously agree, since I already pointed out this solution.
The important part is that "foo " should still be turned into "\bfoo\b".


reply via email to

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