+;;; isearch highlight customization.
+
+(defcustom search-highlight t
+ "*Non-nil means incremental search highlights the current match."
+ :type 'boolean
+ :group 'isearch)
+
+(defface isearch
+ '((((class color) (min-colors 88) (background light))
+ ;; The background must not be too dark, for that means
+ ;; the character is hard to see when the cursor is there.
+ (:background "magenta3" :foreground "lightskyblue1"))
+ (((class color) (min-colors 88) (background dark))
+ (:background "palevioletred2" :foreground "brown4"))
+ (((class color) (min-colors 16))
+ (:background "magenta4" :foreground "cyan1"))
+ (((class color) (min-colors 8))
+ (:background "magenta4" :foreground "cyan1"))
+ (t (:inverse-video t)))
+ "Face for highlighting Isearch matches."
+ :group 'isearch)
+(defvar isearch 'isearch)
+
+(defcustom isearch-lazy-highlight t
+ "*Controls the lazy-highlighting during incremental search.
+When non-nil, all text in the buffer matching the current search
+string is highlighted lazily (see `lazy-highlight-initial-delay'
+and `lazy-highlight-interval')."
+ :type 'boolean
+ :group 'lazy-highlight
+ :group 'isearch)
+
+;;; Lazy highlight customization.
+
+(defgroup lazy-highlight nil
+ "Lazy highlighting feature for matching strings."
+ :prefix "lazy-highlight-"
+ :version "21.1"
+ :group 'isearch
+ :group 'matching)
+
+(defcustom lazy-highlight-cleanup t
+ "*Controls whether to remove extra highlighting after a search.
+If this is nil, extra highlighting can be \"manually\" removed with
+\\[lazy-highlight-cleanup]."
+ :type 'boolean
+ :group 'lazy-highlight)
+(define-obsolete-variable-alias 'isearch-lazy-highlight-cleanup
+ 'lazy-highlight-cleanup
+ "22.1")
+
+(defcustom lazy-highlight-initial-delay 0.25
+ "*Seconds to wait before beginning to lazily highlight all matches."
+ :type 'number
+ :group 'lazy-highlight)
+(define-obsolete-variable-alias 'isearch-lazy-highlight-initial-delay
+ 'lazy-highlight-initial-delay
+ "22.1")
+
+(defcustom lazy-highlight-interval 0 ; 0.0625
+ "*Seconds between lazily highlighting successive matches."
+ :type 'number
+ :group 'lazy-highlight)
+(define-obsolete-variable-alias 'isearch-lazy-highlight-interval
+ 'lazy-highlight-interval
+ "22.1")
+
+(defcustom lazy-highlight-max-at-a-time 20
+ "*Maximum matches to highlight at a time (for `lazy-highlight').
+Larger values may reduce isearch's responsiveness to user input;
+smaller values make matches highlight slowly.
+A value of nil means highlight all matches."
+ :type '(choice (const :tag "All" nil)
+ (integer :tag "Some"))
+ :group 'lazy-highlight)
+(define-obsolete-variable-alias 'isearch-lazy-highlight-max-at-a-time
+ 'lazy-highlight-max-at-a-time
+ "22.1")
+
+(defface lazy-highlight
+ '((((class color) (min-colors 88) (background light))
+ (:background "paleturquoise"))
+ (((class color) (min-colors 88) (background dark))
+ (:background "paleturquoise4"))
+ (((class color) (min-colors 16))
+ (:background "turquoise3"))
+ (((class color) (min-colors 8))
+ (:background "turquoise3"))
+ (t (:underline t)))
+ "Face for lazy highlighting of matches other than the current one."
+ :group 'lazy-highlight)
+(put 'isearch-lazy-highlight-face 'face-alias 'lazy-highlight)
+(defvar lazy-highlight-face 'lazy-highlight)
+(define-obsolete-variable-alias 'isearch-lazy-highlight-face
+ 'lazy-highlight-face
+ "22.1")
+\f