diff options
| -rw-r--r-- | lisp/isearch.el | 11 |
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 |