[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10145: 24.0.91; Word Isearch backward
From: |
Juri Linkov |
Subject: |
bug#10145: 24.0.91; Word Isearch backward |
Date: |
Wed, 30 Nov 2011 17:32:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (x86_64-pc-linux-gnu) |
>> 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.