# HG changeset patch # User Eli Zaretskii # Date 1077901196 0 # Node ID 9a5c3b661a4028e118724b195bf2b064535c4eff # Parent 6c8849d06ab3391a79700cc2f37c8d2abeb0ce22 (face-spec-set-match-display): Add a new attribute, `min-colors'. (region, highlight, secondary-selection): Use `min-colors`. diff -r 6c8849d06ab3 -r 9a5c3b661a40 lisp/faces.el --- 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)