Mercurial > emacs
changeset 34603:dab8fe8d55f4
(isearch-lazy-highlight-max): New user-option.
(isearch-lazy-highlight-update): Don't highlight more than
isearch-lazy-highlight-max matches.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 15 Dec 2000 13:22:21 +0000 |
parents | d5285e74768f |
children | e2ad3c71947b |
files | lisp/isearch.el |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/isearch.el Fri Dec 15 13:01:30 2000 +0000 +++ b/lisp/isearch.el Fri Dec 15 13:22:21 2000 +0000 @@ -1871,6 +1871,12 @@ :type 'number :group 'isearch-lazy-highlight) +(defcustom isearch-lazy-highlight-max 20 + "*Maximum number of matches to highlight." + :type '(choice (const :tag "All" nil) + (integer :tag "Some")) + :group 'isearch-lazy-highlight) + (defgroup isearch-faces nil "Lazy highlighting feature for incremental search." :version "21.1" @@ -1961,7 +1967,10 @@ (defun isearch-lazy-highlight-update () "Find and highlight the next match in the lazy highlighting loop." - (when (not isearch-invalid-regexp) + (when (and (not isearch-invalid-regexp) + (or (null isearch-lazy-highlight-max) + (< (length isearch-lazy-highlight-overlays) + isearch-lazy-highlight-max))) (save-excursion (save-match-data (goto-char (if isearch-forward