diff options
| author | Gerd Moellmann | 2000-10-02 19:18:09 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-10-02 19:18:09 +0000 |
| commit | 18ca20aa86d0588e8a39ac8fd3596476aab150c6 (patch) | |
| tree | 3750e4d4409e0c7055c8257743b7a3e72462effe | |
| parent | 944425c0c3bbee783b07c4fb5dc69a92c2c5355e (diff) | |
| download | emacs-18ca20aa86d0588e8a39ac8fd3596476aab150c6.tar.gz emacs-18ca20aa86d0588e8a39ac8fd3596476aab150c6.zip | |
(isearch-faces): New custom group.
(isearch): New defface; was already tested for in the code.
(isearch-lazy-highlight-face): Changed to defface from defcustom.
(isearch-highlight): Always use face `isearch'.
| -rw-r--r-- | lisp/isearch.el | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index 1dd746b2b18..41b94cf9989 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -1735,9 +1735,7 @@ If there is no completion possible, say so and continue searching." | |||
| 1735 | nil | 1735 | nil |
| 1736 | (or isearch-overlay (setq isearch-overlay (make-overlay beg end))) | 1736 | (or isearch-overlay (setq isearch-overlay (make-overlay beg end))) |
| 1737 | (move-overlay isearch-overlay beg end (current-buffer)) | 1737 | (move-overlay isearch-overlay beg end (current-buffer)) |
| 1738 | (overlay-put isearch-overlay 'face | 1738 | (overlay-put isearch-overlay 'face isearch))) |
| 1739 | (if (facep 'isearch) | ||
| 1740 | 'isearch 'region)))) | ||
| 1741 | 1739 | ||
| 1742 | (defun isearch-dehighlight (totally) | 1740 | (defun isearch-dehighlight (totally) |
| 1743 | (if isearch-overlay | 1741 | (if isearch-overlay |
| @@ -1837,10 +1835,22 @@ If this is nil, extra highlighting can be \"manually\" removed with | |||
| 1837 | :type 'number | 1835 | :type 'number |
| 1838 | :group 'isearch-lazy-highlight) | 1836 | :group 'isearch-lazy-highlight) |
| 1839 | 1837 | ||
| 1840 | (defcustom isearch-lazy-highlight-face 'secondary-selection | 1838 | (defgroup isearch-faces nil |
| 1841 | "*Face to use for lazily highlighting all matches." | 1839 | "Lazy highlighting feature for incremental search." |
| 1842 | :type 'face | 1840 | :version "21.1" |
| 1843 | :group 'isearch-lazy-highlight) | 1841 | :group 'isearch) |
| 1842 | |||
| 1843 | (defface isearch | ||
| 1844 | '((t (:inherit region))) | ||
| 1845 | "Face for highlighting matches." | ||
| 1846 | :group 'isearch-faces) | ||
| 1847 | (defvar isearch 'isearch) | ||
| 1848 | |||
| 1849 | (defface isearch-lazy-highlight-face | ||
| 1850 | '((t (:inherit secondary-selection))) | ||
| 1851 | "Face for lazy highlighting of matches." | ||
| 1852 | :group 'isearch-faces) | ||
| 1853 | (defvar isearch-lazy-highlight-face 'isearch-lazy-highlight-face) | ||
| 1844 | 1854 | ||
| 1845 | (defvar isearch-lazy-highlight-overlays nil) | 1855 | (defvar isearch-lazy-highlight-overlays nil) |
| 1846 | (defvar isearch-lazy-highlight-wrapped nil) | 1856 | (defvar isearch-lazy-highlight-wrapped nil) |
| @@ -1926,7 +1936,7 @@ Attempt to do the search exactly the way the pending isearch would." | |||
| 1926 | ;; found the next match | 1936 | ;; found the next match |
| 1927 | (let ((ov (make-overlay (match-beginning 0) | 1937 | (let ((ov (make-overlay (match-beginning 0) |
| 1928 | (match-end 0)))) | 1938 | (match-end 0)))) |
| 1929 | (overlay-put ov 'face isearch-lazy-highlight-face) | 1939 | (overlay-put ov 'face 'isearch-lazy-highlight-face) |
| 1930 | (overlay-put ov 'priority 0) | 1940 | (overlay-put ov 'priority 0) |
| 1931 | (setq isearch-lazy-highlight-overlays | 1941 | (setq isearch-lazy-highlight-overlays |
| 1932 | (cons ov isearch-lazy-highlight-overlays)) | 1942 | (cons ov isearch-lazy-highlight-overlays)) |