Subject: Re: bug#10145: 24.0.91; Word Isearch backward

From: Juri Linkov <[email-masked]>
Date: Wed, 30 Nov 2011 17:32:45 +0200

>> In the patch below the first line is a complete sentence,
>> and `wordify' is renamed to a better and more correct name
>> `word-regexp':
>
> While `wordify' was OK as a local function in search.c, I think that
> both `wordify' and `word-regexp' are too terse names for (global)
> Elisp functions.  Maybe `search-words-regexp' would be appropriate.

I constructed that name based on the naming pattern of related functions
`word-search-forward' and `word-search-backward'.  A similar name
would be `word-search-regexp'.  However, it is used not only for search,
but for `looking-at' too, so we have to eliminate the `search' part
from the name.  Therefore `word-regexp'.

Another naming pattern would be `regexp-quote' that takes a string
and returns a regexp.  `quote' is a verb here, so using a verb
would produce a name like `regexp-wordify'.

Yet another naming pattern is `number-to-string'.  Using that
we get the name `words-to-regexp'.

> Of course, I also see no reason why it should be implemented in C, so
> moving it to Elisp would be welcome.

I'll provide an Elisp version once the function name is agreed upon.