diff options
| author | Juri Linkov | 2011-12-02 12:19:49 +0200 |
|---|---|---|
| committer | Juri Linkov | 2011-12-02 12:19:49 +0200 |
| commit | 02b16839f5242e93a234e7ebb0578d5aebb529ca (patch) | |
| tree | 7436dcb7526068d6f501a63bda883a5d8dda4367 /lisp | |
| parent | 71c90957bf6d537092d057b743d31e1fd2992f75 (diff) | |
| download | emacs-02b16839f5242e93a234e7ebb0578d5aebb529ca.tar.gz emacs-02b16839f5242e93a234e7ebb0578d5aebb529ca.zip | |
Change `wordify' to `word-search-regexp'.
* lisp/isearch.el (isearch-occur): Use `word-search-regexp' for
`isearch-word'.
(isearch-search-and-update): Add condition for `isearch-word' and
call `word-search-regexp'.
* src/search.c (Fword_search_regexp): New Lisp function created from
`wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
(Fword_search_backward, Fword_search_forward)
(Fword_search_backward_lax, Fword_search_forward_lax):
Use `Fword_search_regexp' instead of `wordify'. Doc fix.
(syms_of_search): Define `Sword_search_regexp'.
Fixes: debbugs:10145
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/isearch.el | 13 |
2 files changed, 12 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4659d118789..43c232bc375 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-12-02 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * isearch.el (isearch-occur): Use `word-search-regexp' for | ||
| 4 | `isearch-word'. | ||
| 5 | (isearch-search-and-update): Add condition for `isearch-word' and | ||
| 6 | call `word-search-regexp'. (Bug#10145) | ||
| 7 | |||
| 1 | 2011-12-01 Glenn Morris <rgm@gnu.org> | 8 | 2011-12-01 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * eshell/em-hist.el (eshell-hist-initialize): | 10 | * eshell/em-hist.el (eshell-hist-initialize): |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 2a7f191bd81..f8aa8e4adc3 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -1438,12 +1438,7 @@ string. NLINES has the same meaning as in `occur'." | |||
| 1438 | (interactive | 1438 | (interactive |
| 1439 | (list | 1439 | (list |
| 1440 | (cond | 1440 | (cond |
| 1441 | (isearch-word (concat "\\b" (replace-regexp-in-string | 1441 | (isearch-word (word-search-regexp isearch-string)) |
| 1442 | "\\W+" "\\W+" | ||
| 1443 | (replace-regexp-in-string | ||
| 1444 | "^\\W+\\|\\W+$" "" isearch-string) | ||
| 1445 | nil t) | ||
| 1446 | "\\b")) | ||
| 1447 | (isearch-regexp isearch-string) | 1442 | (isearch-regexp isearch-string) |
| 1448 | (t (regexp-quote isearch-string))) | 1443 | (t (regexp-quote isearch-string))) |
| 1449 | (if current-prefix-arg (prefix-numeric-value current-prefix-arg)))) | 1444 | (if current-prefix-arg (prefix-numeric-value current-prefix-arg)))) |
| @@ -1642,8 +1637,10 @@ Subword is used when `subword-mode' is activated. " | |||
| 1642 | (if (and (eq case-fold-search t) search-upper-case) | 1637 | (if (and (eq case-fold-search t) search-upper-case) |
| 1643 | (setq case-fold-search | 1638 | (setq case-fold-search |
| 1644 | (isearch-no-upper-case-p isearch-string isearch-regexp))) | 1639 | (isearch-no-upper-case-p isearch-string isearch-regexp))) |
| 1645 | (looking-at (if isearch-regexp isearch-string | 1640 | (looking-at (cond |
| 1646 | (regexp-quote isearch-string)))) | 1641 | (isearch-word (word-search-regexp isearch-string t)) |
| 1642 | (isearch-regexp isearch-string) | ||
| 1643 | (t (regexp-quote isearch-string))))) | ||
| 1647 | (error nil)) | 1644 | (error nil)) |
| 1648 | (or isearch-yank-flag | 1645 | (or isearch-yank-flag |
| 1649 | (<= (match-end 0) | 1646 | (<= (match-end 0) |