aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorStefan Monnier2013-08-05 14:05:46 -0400
committerStefan Monnier2013-08-05 14:05:46 -0400
commitdc6c0edad789a8aab129ae12b8f064d0e912cca7 (patch)
treec1a48c60a90799f3a05b7db15ac66bd2111bd78e /lisp/replace.el
parent98a428c15ad48f8579b00b68aae6a89b34238b12 (diff)
downloademacs-dc6c0edad789a8aab129ae12b8f064d0e912cca7.tar.gz
emacs-dc6c0edad789a8aab129ae12b8f064d0e912cca7.zip
Revert introduction of isearch-filter-predicates.
Rely on add-function instead. * lisp/loadup.el: Preload nadvice. * lisp/isearch.el (isearch-filter-predicates): Rename it back to isearch-filter-predicate. (isearch-message-prefix): Use advice-function-mapc and advice properties to get the isearch-message-prefix. (isearch-search, isearch-lazy-highlight-search): Revert to funcall instead of run-hook-with-args-until-failure. (isearch-filter-visible): Not obsolete any more. * lisp/replace.el (perform-replace): Revert to funcall instead of run-hook-with-args-until-failure. * lisp/wdired.el (wdired-change-to-wdired-mode): Use add-function. * lisp/dired-aux.el (dired-isearch-filenames-mode): Rename from dired-isearch-filenames-toggle; make it into a proper minor mode. Use add/remove-function. (dired-isearch-filenames-setup, dired-isearch-filenames-end): Call the minor-mode rather than add/remove-hook. (dired-isearch-filter-filenames): Remove isearch-message-prefix property. * lisp/info.el (Info--search-loop): New function, extracted from Info-search. Funcall isearch-filter-predicate instead of run-hook-with-args-until-failure isearch-filter-predicates. (Info-search): Use it. (Info-mode): Use isearch-filter-predicate instead of isearch-filter-predicates. * src/lisp.mk (lisp): Add nadvice.elc. * lib-src/makefile.w32-in (lisp2): Add nadvice.elc. Fixes: debbugs:14714
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index be0ecda20fa..5e44677b0f8 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -252,7 +252,7 @@ or capitalized.)
252 252
253Ignore read-only matches if `query-replace-skip-read-only' is non-nil, 253Ignore read-only matches if `query-replace-skip-read-only' is non-nil,
254ignore hidden matches if `search-invisible' is nil, and ignore more 254ignore hidden matches if `search-invisible' is nil, and ignore more
255matches using a non-nil `isearch-filter-predicates'. 255matches using `isearch-filter-predicate'.
256 256
257If `replace-lax-whitespace' is non-nil, a space or spaces in the string 257If `replace-lax-whitespace' is non-nil, a space or spaces in the string
258to be replaced will match a sequence of whitespace chars defined by the 258to be replaced will match a sequence of whitespace chars defined by the
@@ -306,7 +306,7 @@ capitalized.)
306 306
307Ignore read-only matches if `query-replace-skip-read-only' is non-nil, 307Ignore read-only matches if `query-replace-skip-read-only' is non-nil,
308ignore hidden matches if `search-invisible' is nil, and ignore more 308ignore hidden matches if `search-invisible' is nil, and ignore more
309matches using a non-nil `isearch-filter-predicates'. 309matches using `isearch-filter-predicate'.
310 310
311If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp 311If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp
312to be replaced will match a sequence of whitespace chars defined by the 312to be replaced will match a sequence of whitespace chars defined by the
@@ -390,7 +390,7 @@ are non-nil and REGEXP has no uppercase letters.
390 390
391Ignore read-only matches if `query-replace-skip-read-only' is non-nil, 391Ignore read-only matches if `query-replace-skip-read-only' is non-nil,
392ignore hidden matches if `search-invisible' is nil, and ignore more 392ignore hidden matches if `search-invisible' is nil, and ignore more
393matches using a non-nil `isearch-filter-predicates'. 393matches using `isearch-filter-predicate'.
394 394
395If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp 395If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp
396to be replaced will match a sequence of whitespace chars defined by the 396to be replaced will match a sequence of whitespace chars defined by the
@@ -484,7 +484,7 @@ then its replacement is upcased or capitalized.)
484 484
485Ignore read-only matches if `query-replace-skip-read-only' is non-nil, 485Ignore read-only matches if `query-replace-skip-read-only' is non-nil,
486ignore hidden matches if `search-invisible' is nil, and ignore more 486ignore hidden matches if `search-invisible' is nil, and ignore more
487matches using a non-nil `isearch-filter-predicates'. 487matches using `isearch-filter-predicate'.
488 488
489If `replace-lax-whitespace' is non-nil, a space or spaces in the string 489If `replace-lax-whitespace' is non-nil, a space or spaces in the string
490to be replaced will match a sequence of whitespace chars defined by the 490to be replaced will match a sequence of whitespace chars defined by the
@@ -530,7 +530,7 @@ are non-nil and REGEXP has no uppercase letters.
530 530
531Ignore read-only matches if `query-replace-skip-read-only' is non-nil, 531Ignore read-only matches if `query-replace-skip-read-only' is non-nil,
532ignore hidden matches if `search-invisible' is nil, and ignore more 532ignore hidden matches if `search-invisible' is nil, and ignore more
533matches using a non-nil `isearch-filter-predicates'. 533matches using `isearch-filter-predicate'.
534 534
535If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp 535If `replace-regexp-lax-whitespace' is non-nil, a space or spaces in the regexp
536to be replaced will match a sequence of whitespace chars defined by the 536to be replaced will match a sequence of whitespace chars defined by the
@@ -2087,9 +2087,8 @@ make, or the user didn't cancel the call."
2087 'read-only nil)))) 2087 'read-only nil))))
2088 (setq skip-read-only-count (1+ skip-read-only-count))) 2088 (setq skip-read-only-count (1+ skip-read-only-count)))
2089 ;; Optionally filter out matches. 2089 ;; Optionally filter out matches.
2090 ((not (run-hook-with-args-until-failure 2090 ((not (funcall isearch-filter-predicate
2091 'isearch-filter-predicates 2091 (nth 0 real-match-data) (nth 1 real-match-data)))
2092 (nth 0 real-match-data) (nth 1 real-match-data)))
2093 (setq skip-filtered-count (1+ skip-filtered-count))) 2092 (setq skip-filtered-count (1+ skip-filtered-count)))
2094 ;; Optionally ignore invisible matches. 2093 ;; Optionally ignore invisible matches.
2095 ((not (or (eq search-invisible t) 2094 ((not (or (eq search-invisible t)