changeset 54151:9a5c3b661a40

(face-spec-set-match-display): Add a new attribute, `min-colors'. (region, highlight, secondary-selection): Use `min-colors`.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 27 Feb 2004 16:59:56 +0000
parents 6c8849d06ab3
children 42286a8d371c
files lisp/faces.el
diffstat 1 files changed, 29 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/faces.el	Thu Feb 26 17:46:48 2004 +0000
+++ b/lisp/faces.el	Fri Feb 27 16:59:56 2004 +0000
@@ -1314,6 +1314,8 @@
 				  (not (featurep 'motif)))
 			     (and (memq 'x-toolkit options)
 				  (featurep 'x-toolkit))))
+			((eq req 'min-colors)
+			 (>= (display-color-cells frame) (car options)))
 			((eq req 'class)
 			 (memq (frame-parameter frame 'display-type) options))
 			((eq req 'background)
@@ -1892,14 +1894,18 @@
       (append minibuffer-prompt-properties (list 'face 'minibuffer-prompt)))
 
 (defface region
-  '((((type tty) (class color))
+  '((((class color) (min-colors 88) (background dark))
+     :background "blue3")
+    (((class color) (min-colors 88) (background light))
+     :background "lightgoldenrod2")
+    (((class color) (min-colors 16) (background dark))
+     :background "blue3")
+    (((class color) (min-colors 16) (background light))
+     :background "lightgoldenrod2")
+    (((class color) (min-colors 8))
      :background "blue" :foreground "white")
     (((type tty) (class mono))
      :inverse-video t)
-    (((class color) (background dark))
-     :background "blue3")
-    (((class color) (background light))
-     :background "lightgoldenrod2")
     (t :background "gray"))
   "Basic face for highlighting the region."
   :version "21.1"
@@ -1990,24 +1996,32 @@
 
 
 (defface highlight
-  '((((type tty) (class color))
+  '((((class color) (min-colors 88) (background light))
+     :background "darkseagreen2")
+    (((class color) (min-colors 88) (background dark))
+     :background "darkolivegreen")
+    (((class color) (min-colors 16) (background light))
+     :background "darkseagreen2")
+    (((class color) (min-colors 16) (background dark))
+     :background "darkolivegreen")
+    (((class color) (min-colors 8))
      :background "green" :foreground "black")
-    (((class color) (background light))
-     :background "darkseagreen2")
-    (((class color) (background dark))
-     :background "darkolivegreen")
     (t :inverse-video t))
   "Basic face for highlighting."
   :group 'basic-faces)
 
 
 (defface secondary-selection
-  '((((type tty) (class color))
+  '((((class color) (min-colors 88) (background light))
+     :background "yellow")
+    (((class color) (min-colors 88) (background dark))
+     :background "SkyBlue4")
+    (((class color) (min-colors 16) (background light))
+     :background "yellow")
+    (((class color) (min-colors 16) (background dark))
+     :background "SkyBlue4")
+    (((class color) (min-colors 8))
      :background "cyan" :foreground "black")
-    (((class color) (background light))
-     :background "yellow")
-    (((class color) (background dark))
-     :background "SkyBlue4")
     (t :inverse-video t))
   "Basic face for displaying the secondary selection."
   :group 'basic-faces)