mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
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
This commit is contained in:
parent
71c90957bf
commit
02b16839f5
4 changed files with 59 additions and 27 deletions
|
|
@ -1438,12 +1438,7 @@ string. NLINES has the same meaning as in `occur'."
|
|||
(interactive
|
||||
(list
|
||||
(cond
|
||||
(isearch-word (concat "\\b" (replace-regexp-in-string
|
||||
"\\W+" "\\W+"
|
||||
(replace-regexp-in-string
|
||||
"^\\W+\\|\\W+$" "" isearch-string)
|
||||
nil t)
|
||||
"\\b"))
|
||||
(isearch-word (word-search-regexp isearch-string))
|
||||
(isearch-regexp isearch-string)
|
||||
(t (regexp-quote isearch-string)))
|
||||
(if current-prefix-arg (prefix-numeric-value current-prefix-arg))))
|
||||
|
|
@ -1642,8 +1637,10 @@ Subword is used when `subword-mode' is activated. "
|
|||
(if (and (eq case-fold-search t) search-upper-case)
|
||||
(setq case-fold-search
|
||||
(isearch-no-upper-case-p isearch-string isearch-regexp)))
|
||||
(looking-at (if isearch-regexp isearch-string
|
||||
(regexp-quote isearch-string))))
|
||||
(looking-at (cond
|
||||
(isearch-word (word-search-regexp isearch-string t))
|
||||
(isearch-regexp isearch-string)
|
||||
(t (regexp-quote isearch-string)))))
|
||||
(error nil))
|
||||
(or isearch-yank-flag
|
||||
(<= (match-end 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue