[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 61bad71: [el-search] Improve match faces

From: Michael Heerdegen
Subject: [elpa] master 61bad71: [el-search] Improve match faces
Date: Sun, 22 Jul 2018 11:37:44 -0400 (EDT)

branch: master
commit 61bad717b2f04e1c21b22c915387c5a19c5cc33f
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    [el-search] Improve match faces
    Optimize face definitions for terminals with few colors.
    We also define a separate face for highlighting matches in *El Occur*
    buffers to make them better distinguishable from search buffers, and
    also to improve the visual feedback when doing an el-search in
    *El Occur*.
    Bump version to 1.7.3.
    (el-search-match, el-search-other-match): Optimize definitions for
    (el-search-occur-match): New face.
    (el-search--occur): Use it.
 packages/el-search/NEWS         |  6 ++++++
 packages/el-search/el-search.el | 25 +++++++++++++++++--------
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/packages/el-search/NEWS b/packages/el-search/NEWS
index 1847eba..bc58997 100644
--- a/packages/el-search/NEWS
+++ b/packages/el-search/NEWS
@@ -1,6 +1,12 @@
 Some of the user visible news were:
+Version: 1.7.3
+Match highlighting faces have been improved to look better on text
+terminals.  Matches in *El Occur* buffers are now highlighted with a
+separate face.
 Version: 1.7
   Signature and semantics of non-interactive function
diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index a46a1be..1a47072 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -7,7 +7,7 @@
 ;; Created: 29 Jul 2015
 ;; Keywords: lisp
 ;; Compatibility: GNU Emacs 25
-;; Version: 1.7.2
+;; Version: 1.7.3
 ;; Package-Requires: ((emacs "25") (stream "2.2.4") (cl-print "1.0"))
@@ -453,18 +453,27 @@
   "Expression based search and replace for Emacs Lisp."
   :group 'lisp)
-(defface el-search-match '((((background dark))
-                            ;; (:background "#0000A0")
+(defface el-search-match '((((class color) (min-colors 88) (background dark))
                             (:background "#600000"))
-                          (t (:background "DarkSlateGray3")))
+                          (((class color) (min-colors 88) (background light))
+                            (:background "DarkSlateGray3"))
+                           (t (:background "red")))
   "Face for highlighting the current match.")
-(defface el-search-other-match '((((background dark))
-                                  ;; (:background "#202060")
+(defface el-search-other-match '((((class color) (min-colors 88) (background 
                                   (:background "#603030"))
-                                 (t (:background "DarkSlateGray1")))
+                                 (((class color) (min-colors 88) (background 
+                                  (:background "DarkSlateGray1"))
+                                 (t (:background "red")))
   "Face for highlighting the other matches.")
+(defface el-search-occur-match '((((class color) (min-colors 88) (background 
+                                  (:background "#000060"))
+                                (((class color) (min-colors 88) (background 
+                                  (:background "GreenYellow"))
+                                 (t (:background "blue")))
+  "Face for highlighting matches in *El Occur*.")
 (defface el-search-highlight-in-prompt-face '((t (:inherit warning)))
   "Face for highlighting important parts in prompts.")
@@ -3063,7 +3072,7 @@ Prompt for a new pattern and revert."
                                                     'match-data `(,buffer 
,match-beg ,file)))
                                            (let ((ov (make-overlay 
insertion-point (point) nil t)))
-                                             (overlay-put ov 'face 
+                                             (overlay-put ov 'face 
                                               ov 'el-search-match (list (or 
file buffer) match-beg)))
                                            (with-current-buffer buffer 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]