aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-12-15 13:22:21 +0000
committerGerd Moellmann2000-12-15 13:22:21 +0000
commit68ebbb959e5ef9e87cb41dde08397622cf756b3a (patch)
treef45247506a4d5be304d63cdde8911714ebd04525
parent8062e53a7c455bb0d6ff48440e34352b91d0c6d9 (diff)
downloademacs-68ebbb959e5ef9e87cb41dde08397622cf756b3a.tar.gz
emacs-68ebbb959e5ef9e87cb41dde08397622cf756b3a.zip
(isearch-lazy-highlight-max): New user-option.
(isearch-lazy-highlight-update): Don't highlight more than isearch-lazy-highlight-max matches.
-rw-r--r--lisp/isearch.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index ae5d1cbf0b2..86164001ddb 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1871,6 +1871,12 @@ If this is nil, extra highlighting can be \"manually\" removed with
1871 :type 'number 1871 :type 'number
1872 :group 'isearch-lazy-highlight) 1872 :group 'isearch-lazy-highlight)
1873 1873
1874(defcustom isearch-lazy-highlight-max 20
1875 "*Maximum number of matches to highlight."
1876 :type '(choice (const :tag "All" nil)
1877 (integer :tag "Some"))
1878 :group 'isearch-lazy-highlight)
1879
1874(defgroup isearch-faces nil 1880(defgroup isearch-faces nil
1875 "Lazy highlighting feature for incremental search." 1881 "Lazy highlighting feature for incremental search."
1876 :version "21.1" 1882 :version "21.1"
@@ -1961,7 +1967,10 @@ Attempt to do the search exactly the way the pending isearch would."
1961 1967
1962(defun isearch-lazy-highlight-update () 1968(defun isearch-lazy-highlight-update ()
1963 "Find and highlight the next match in the lazy highlighting loop." 1969 "Find and highlight the next match in the lazy highlighting loop."
1964 (when (not isearch-invalid-regexp) 1970 (when (and (not isearch-invalid-regexp)
1971 (or (null isearch-lazy-highlight-max)
1972 (< (length isearch-lazy-highlight-overlays)
1973 isearch-lazy-highlight-max)))
1965 (save-excursion 1974 (save-excursion
1966 (save-match-data 1975 (save-match-data
1967 (goto-char (if isearch-forward 1976 (goto-char (if isearch-forward