diff options
author | Juri Linkov <juri@jurta.org> | 2008-12-23 21:01:41 +0000 |
---|---|---|
committer | Juri Linkov <juri@jurta.org> | 2008-12-23 21:01:41 +0000 |
commit | f2fd32611c27a603f147ceec8c9ae8940f2a1a80 (patch) | |
tree | 9ad7b20a678863cefdb16ee9bfaa438781f9b432 /lisp/isearch.el | |
parent | e2749141d61c6127003b9bee567d1bf9ac54a3f6 (diff) |
(isearch-filter-predicate, isearch-search): Replace
`isearch-filter-invisible' with `isearch-filter-visible'.
(isearch-filter-visible): Renamed from
`isearch-filter-invisible'. Doc fix.
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r-- | lisp/isearch.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index c65fb1a4146..b4d31dd15fd 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -176,7 +176,7 @@ or to the end of the buffer for a backward search.") "Function to save a function restoring the mode-specific Isearch state to the search status stack.") -(defvar isearch-filter-predicate 'isearch-filter-invisible +(defvar isearch-filter-predicate 'isearch-filter-visible "Predicate that filters the search hits that would normally be available. Search hits that dissatisfy the predicate are skipped. The function has two arguments: the positions of start and end of text matched by @@ -2254,7 +2254,7 @@ update the match data, and return point." (isearch-no-upper-case-p isearch-string isearch-regexp))) (condition-case lossage (let ((inhibit-point-motion-hooks - (and (eq isearch-filter-predicate 'isearch-filter-invisible) + (and (eq isearch-filter-predicate 'isearch-filter-visible) search-invisible)) (inhibit-quit nil) (case-fold-search isearch-case-fold-search) @@ -2448,10 +2448,11 @@ update the match data, and return point." nil) (setq isearch-hidden t))))))) -(defun isearch-filter-invisible (beg end) - "Default predicate to filter out invisible text. -It filters search hits to those that are visible (at least partially), -unless invisible text too can be searched." +(defun isearch-filter-visible (beg end) + "Test whether the current search hit is visible at least partially. +Return non-nil if the text from BEG to END is visible to Isearch as +determined by `isearch-range-invisible' unless invisible text can be +searched too when `search-invisible' is t." (or (eq search-invisible t) (not (isearch-range-invisible beg end)))) |