From: Eli Zaretskii Date: Fri, 27 Feb 2004 16:59:56 +0000 (+0000) Subject: (face-spec-set-match-display): Add a new attribute, `min-colors'. X-Git-Tag: ttn-vms-21-2-B4~7460 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=03dd94f22d8d78708788e2ff908ba59e678b891c;p=emacs.git (face-spec-set-match-display): Add a new attribute, `min-colors'. (region, highlight, secondary-selection): Use `min-colors`. --- diff --git a/lisp/faces.el b/lisp/faces.el index 49652175f41..0f613f2a1f9 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1314,6 +1314,8 @@ If FRAME is nil, the current FRAME is used." (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 @@ created." (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 @@ created." (defface highlight - '((((type tty) (class color)) - :background "green" :foreground "black") - (((class color) (background light)) + '((((class color) (min-colors 88) (background light)) :background "darkseagreen2") - (((class color) (background dark)) + (((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") (t :inverse-video t)) "Basic face for highlighting." :group 'basic-faces) (defface secondary-selection - '((((type tty) (class color)) - :background "cyan" :foreground "black") - (((class color) (background light)) + '((((class color) (min-colors 88) (background light)) :background "yellow") - (((class color) (background dark)) + (((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") (t :inverse-video t)) "Basic face for displaying the secondary selection." :group 'basic-faces)