aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2008-12-18 01:17:07 +0000
committerJuri Linkov2008-12-18 01:17:07 +0000
commitb87573f01cdcad6c706fa76a1e7a68ecb1d95eb8 (patch)
tree49399fd29bd0f88048314e9fc12daed49e7d79f3
parent579d2d62aa3cee4a06a4488bd7f6d0b6d4450056 (diff)
downloademacs-b87573f01cdcad6c706fa76a1e7a68ecb1d95eb8.tar.gz
emacs-b87573f01cdcad6c706fa76a1e7a68ecb1d95eb8.zip
(minibuffer-local-isearch-map): Unbind "C-w" from
`isearch-edit-string-set-word'. (isearch-edit-string-set-word): Remove. (isearch-occur): Imitate the C function `wordify' by replacing non-word character with the \\W+ regexp. (isearch-search-fun): Add `isearch-nonincremental' to the condition of using a non-lax version of `word-search-forward'.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/isearch.el31
2 files changed, 24 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3a3657b4b84..87f319c397f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12008-12-18 Juri Linkov <juri@jurta.org>
2
3 * isearch.el (minibuffer-local-isearch-map): Unbind "C-w" from
4 `isearch-edit-string-set-word'.
5 (isearch-edit-string-set-word): Remove.
6 (isearch-occur): Imitate the C function `wordify' by replacing
7 non-word character with the \\W+ regexp.
8 (isearch-search-fun): Add `isearch-nonincremental' to the
9 condition of using a non-lax version of `word-search-forward'.
10
12008-12-17 Daiki Ueno <ueno@unixuser.org> 112008-12-17 Daiki Ueno <ueno@unixuser.org>
2 12
3 * epa-file.el (epa-file-insert-file-contents): Set 13 * epa-file.el (epa-file-insert-file-contents): Set
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 1e0b49bc14b..c65fb1a4146 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -509,7 +509,6 @@ This is like `describe-bindings', but displays only Isearch keys."
509 (define-key map "\M-\t" 'isearch-complete-edit) 509 (define-key map "\M-\t" 'isearch-complete-edit)
510 (define-key map "\C-s" 'isearch-forward-exit-minibuffer) 510 (define-key map "\C-s" 'isearch-forward-exit-minibuffer)
511 (define-key map "\C-r" 'isearch-reverse-exit-minibuffer) 511 (define-key map "\C-r" 'isearch-reverse-exit-minibuffer)
512 (define-key map "\C-w" 'isearch-edit-string-set-word)
513 (define-key map "\C-f" 'isearch-yank-char-in-minibuffer) 512 (define-key map "\C-f" 'isearch-yank-char-in-minibuffer)
514 (define-key map [right] 'isearch-yank-char-in-minibuffer) 513 (define-key map [right] 'isearch-yank-char-in-minibuffer)
515 map) 514 map)
@@ -1194,15 +1193,6 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst
1194 (isearch-abort) ;; outside of let to restore outside global values 1193 (isearch-abort) ;; outside of let to restore outside global values
1195 ))) 1194 )))
1196 1195
1197;; Obsolete usage of `C-s M-e C-w'. Remove after 23.1.
1198(defvar isearch-new-word)
1199(defun isearch-edit-string-set-word ()
1200 "Do word search after exiting `isearch-edit-string'."
1201 (interactive)
1202 (message "This feature is obsolete since 23.1; use `M-s w' instead.")
1203 (setq isearch-word t isearch-new-word t))
1204
1205
1206(defun isearch-nonincremental-exit-minibuffer () 1196(defun isearch-nonincremental-exit-minibuffer ()
1207 (interactive) 1197 (interactive)
1208 (setq isearch-nonincremental t) 1198 (setq isearch-nonincremental t)
@@ -1395,7 +1385,12 @@ string. NLINES has the same meaning as in `occur'."
1395 (interactive 1385 (interactive
1396 (list 1386 (list
1397 (cond 1387 (cond
1398 (isearch-word (concat "\\b" (regexp-quote isearch-string) "\\b")) 1388 (isearch-word (concat "\\b" (replace-regexp-in-string
1389 "\\W+" "\\W+"
1390 (replace-regexp-in-string
1391 "^\\W+\\|\\W+$" "" isearch-string)
1392 nil t)
1393 "\\b"))
1399 (isearch-regexp isearch-string) 1394 (isearch-regexp isearch-string)
1400 (t (regexp-quote isearch-string))) 1395 (t (regexp-quote isearch-string)))
1401 (if current-prefix-arg (prefix-numeric-value current-prefix-arg)))) 1396 (if current-prefix-arg (prefix-numeric-value current-prefix-arg))))
@@ -2200,12 +2195,14 @@ Can be changed via `isearch-search-fun-function' for special needs."
2200 (funcall isearch-search-fun-function) 2195 (funcall isearch-search-fun-function)
2201 (cond 2196 (cond
2202 (isearch-word 2197 (isearch-word
2203 ;; Use lax versions to not fail at the end of the word while the user 2198 ;; Use lax versions to not fail at the end of the word while
2204 ;; adds and removes characters in the search string 2199 ;; the user adds and removes characters in the search string
2205 (if (not (eq (length isearch-string) 2200 ;; (or when using nonincremental word isearch)
2206 (length (isearch-string-state (car isearch-cmds))))) 2201 (if (or isearch-nonincremental
2207 (if isearch-forward 'word-search-forward-lax 'word-search-backward-lax) 2202 (eq (length isearch-string)
2208 (if isearch-forward 'word-search-forward 'word-search-backward))) 2203 (length (isearch-string-state (car isearch-cmds)))))
2204 (if isearch-forward 'word-search-forward 'word-search-backward)
2205 (if isearch-forward 'word-search-forward-lax 'word-search-backward-lax)))
2209 (isearch-regexp 2206 (isearch-regexp
2210 (if isearch-forward 're-search-forward 're-search-backward)) 2207 (if isearch-forward 're-search-forward 're-search-backward))
2211 (t 2208 (t