]> code.delx.au - gnu-emacs/commitdiff
* isearch.el (isearch-search-fun-default): (Bug#21164)
authorArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 9 Aug 2015 08:56:33 +0000 (09:56 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 9 Aug 2015 08:57:05 +0000 (09:57 +0100)
Respect `isearch-lax-whitespace' when searching through
`isearch-word'.

lisp/isearch.el

index 8d4bf24c6fb719a0881aa4e30fd8e4b25a1c023d..2d2f0ee2495bea5a8fdccccc0ce59e6ac14695cb 100644 (file)
@@ -2607,11 +2607,12 @@ Can be changed via `isearch-search-fun-function' for special needs."
       ;; Use lax versions to not fail at the end of the word while
       ;; the user adds and removes characters in the search string
       ;; (or when using nonincremental word isearch)
-      (let ((lax (not (or isearch-nonincremental
-                         (null (car isearch-cmds))
-                         (eq (length isearch-string)
-                             (length (isearch--state-string
-                                       (car isearch-cmds))))))))
+      (let ((lax (or isearch-lax-whitespace
+                     (not (or isearch-nonincremental
+                              (null (car isearch-cmds))
+                              (eq (length isearch-string)
+                                  (length (isearch--state-string
+                                           (car isearch-cmds)))))))))
        (funcall
         (if isearch-forward #'re-search-forward #'re-search-backward)
         (if (functionp isearch-word)