so that the matching can proceed incrementally as you type. This
additional laxity does not apply to the lazy highlight
(@pxref{Incremental Search}), which always matches whole words.
+While you are typing the search string, @samp{Pending} appears in the
+search prompt until you use a search repeating key like @kbd{C-s}.
The word search commands don't perform character folding, and
toggling lax whitespace matching (@pxref{Lax Search, lax space
active, @kbd{M-s _} switches to a symbol search, preserving the
direction of the search and the current search string; you can disable
symbol search by typing @kbd{M-s _} again. In incremental symbol
-search, only the beginning of the search string is required to match
-the beginning of a symbol.
+search, while you are typing the search string, only the beginning
+of the search string is required to match the beginning of a symbol,
+and @samp{Pending} appears in the search prompt until you use a search
+repeating key like @kbd{C-s}.
To begin a nonincremental symbol search, type @kbd{M-s _ @key{RET}}
for a forward search, or @kbd{M-s _ C-r @key{RET}} or a backward
(cond
(isearch-regexp-function
;; Lax version of word search
- (let ((lax (not (or isearch-nonincremental
- (eq (length string)
- (length (isearch--state-string
- (car isearch-cmds))))))))
+ (let ((lax (and (not bound) (isearch--lax-regexp-function-p))))
+ (when lax
+ (setq isearch-adjusted t))
(if (functionp isearch-regexp-function)
(funcall isearch-regexp-function string lax)
(word-search-regexp string lax))))
((string-match-p "\\`\\W+\\'" string) "\\W+")
(t (concat
(if (string-match-p "\\`\\W" string) "\\W+"
- (unless lax "\\<"))
+ "\\<")
(mapconcat 'regexp-quote (split-string string "\\W+" t) "\\W+")
(if (string-match-p "\\W\\'" string) "\\W+"
(unless lax "\\>"))))))
((string-match-p (format "\\`%s\\'" not-word-symbol-re) string) not-word-symbol-re)
(t (concat
(if (string-match-p (format "\\`%s" not-word-symbol-re) string) not-word-symbol-re
- (unless lax "\\_<"))
+ "\\_<")
(mapconcat 'regexp-quote (split-string string not-word-symbol-re t) not-word-symbol-re)
(if (string-match-p (format "%s\\'" not-word-symbol-re) string) not-word-symbol-re
(unless lax "\\_>")))))))
(funcall
(if isearch-forward #'re-search-forward #'re-search-backward)
(cond (isearch-regexp-function
- (let ((lax (isearch--lax-regexp-function-p)))
+ (let ((lax (and (not bound) (isearch--lax-regexp-function-p))))
+ (when lax
+ (setq isearch-adjusted t))
(if (functionp isearch-regexp-function)
(funcall isearch-regexp-function string lax)
(word-search-regexp string lax))))