From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: supporting more faces on 256 colors xterms Date: Thu, 12 Feb 2004 14:13:34 -0800 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200402122213.i1CMDW24017434@scanner2.ics.uci.edu> References: <200402080413.i184DH6M015994@gremlin.ics.uci.edu> <200402080815.i188F46M001654@gremlin.ics.uci.edu> <9003-Sun08Feb2004202425+0200-eliz@elta.co.il> <200402082352.i18NqY6M003350@gremlin.ics.uci.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1076625433 10381 80.91.224.253 (12 Feb 2004 22:37:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Feb 2004 22:37:13 +0000 (UTC) Cc: schwab@suse.de, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Feb 12 23:37:06 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ArPSE-00075o-00 for ; Thu, 12 Feb 2004 23:37:06 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ArPSD-0003lo-00 for ; Thu, 12 Feb 2004 23:37:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ArPA4-0007ns-9w for emacs-devel@quimby.gnus.org; Thu, 12 Feb 2004 17:18:20 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ArP7H-0007PA-Lh for emacs-devel@gnu.org; Thu, 12 Feb 2004 17:15:27 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ArP6R-0007BE-S2 for emacs-devel@gnu.org; Thu, 12 Feb 2004 17:15:08 -0500 Original-Received: from [128.195.1.36] (helo=scanner2.ics.uci.edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ArP6R-0007B4-4v for emacs-devel@gnu.org; Thu, 12 Feb 2004 17:14:35 -0500 Original-Received: from vino.ics.uci.edu (vino.ics.uci.edu [128.195.11.198]) by scanner2.ics.uci.edu (8.12.10/8.12.10) with ESMTP id i1CMDW24017434; Thu, 12 Feb 2004 14:13:32 -0800 (PST) Original-To: Eli Zaretskii In-Reply-To: Original-Lines: 38 X-ICS-MailScanner-smtp3: Found to be clean X-ICS-MailScanner-SpamCheck-smtp3: not spam (whitelisted), SpamAssassin (score=-125.8, required 5, EMAIL_ATTRIBUTION, IN_REP_TO, PATCH_CONTEXT_DIFF, REFERENCES, REPLY_WITH_QUOTES, USER_IN_WHITELIST) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19903 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19903 --=-=-= Eli Zaretskii writes: > > From: Dan Nicolaescu > > Date: Sun, 08 Feb 2004 15:52:36 -0800 > > > > We don't really need both `ncolors>=' and `ncolors<=', `ncolors>=' (or > > whatever we decide to call it) is enough. > > Perhaps that's true, but implementing both is trivial, and there > could be some situations where we might want that. IMHO, `min-colors' should be enough, what situations do you have in mind that would need `max-colors' too?. Because it's trivial to implement, we can add it whenever the need arises. It's easier to add features that to add features that to remove unneeded features. But in order to expedite the process of getting this patch in, and because I don't have strong feelings about this, I implemented both versions, both attached as separate patches. Just pick one. Of all options, `min-colors' seemed the best name, so that is what is used in the patches. The default faces and the font-lock faces have been changed to take advantage of `min-colors'. These faces look very similar now on a 256 colors xterm and on X11. If the patch is OK, please check it in. If anything else is needed please let me know. Thanks. --dan --=-=-= Content-Disposition: attachment; filename=PATCH.only_min-colors Content-Description: Patch that implements only min-colors For the etc/NEWS file, I don't know where this would fit, so it's not a patch. A new attribute `min-colors' has been added to the `defface' face specification language. It is used to specify the face characteristics depending on the number of colors supported by the display. lisp/ChangeLog 2004-02-12 Dan Nicolaescu * faces.el (face-spec-set-match-display): Add a new attribute, `min-colors'. (region, highlight, secondary-selection): Use `min-colors`. * custom.el (defface): Add documentation for `min-colors'. * font-lock.el (font-lock-comment-face, font-lock-string-face, font-lock-keyword-face, font-lock-function-name-face, font-lock-variable-name-face, font-lock-constant-face): Use `min-colors`. * isearch.el (isearch, isearch-lazy-highlight-face): Use `min-colors'. lispref/ChangeLog 2004-02-12 Dan Nicolaescu * display.texi (Defining Faces): Add description for min-colors. Index: lisp/faces.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v retrieving revision 1.280 diff -c -3 -p -r1.280 faces.el *** lisp/faces.el 1 Sep 2003 15:45:11 -0000 1.280 --- lisp/faces.el 12 Feb 2004 21:42:10 -0000 *************** If FRAME is nil, the current FRAME is us *** 1314,1319 **** --- 1314,1321 ---- (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) *************** created." *** 1892,1905 **** (append minibuffer-prompt-properties (list 'face 'minibuffer-prompt))) (defface region ! '((((type tty) (class color)) :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" --- 1894,1907 ---- (append minibuffer-prompt-properties (list 'face 'minibuffer-prompt))) (defface region ! '((((class color) (min-colors 88) (background dark)) ! :background "blue3") ! (((class color) (min-colors 88) (background light)) ! :background "lightgoldenrod2") ! (((class color) (min-colors 8)) :background "blue" :foreground "white") (((type tty) (class mono)) :inverse-video t) (t :background "gray")) "Basic face for highlighting the region." :version "21.1" *************** created." *** 1990,2013 **** (defface highlight ! '((((type tty) (class color)) ! :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)) ! :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) --- 1992,2015 ---- (defface highlight ! '((((class color) (min-colors 88) (background light)) :background "darkseagreen2") ! (((class color) (min-colors 88) (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 ! '((((class color) (min-colors 88) (background light)) :background "yellow") ! (((class color) (min-colors 88) (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) Index: lisp/custom.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/custom.el,v retrieving revision 1.70 diff -c -3 -p -r1.70 custom.el *** lisp/custom.el 29 Dec 2003 11:53:19 -0000 1.70 --- lisp/custom.el 12 Feb 2004 21:42:10 -0000 *************** following REQ are defined: *** 306,311 **** --- 306,315 ---- `background' (what color is used for the background text) Should be one of `light' or `dark'. + `min-colors' (the minimum number of colors the frame should support) + Should be an integer, it is compared with the result of + `display-color-cells'. + Read the section about customization in the Emacs Lisp manual for more information." ;; It is better not to use backquote in this file, Index: lisp/font-lock.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/font-lock.el,v retrieving revision 1.214 diff -c -3 -p -r1.214 font-lock.el *** lisp/font-lock.el 26 Jan 2004 23:03:43 -0000 1.214 --- lisp/font-lock.el 12 Feb 2004 21:42:11 -0000 *************** Sets various variables using `font-lock- *** 1560,1583 **** ;; But now we do it the custom way. Note that `defface' will not overwrite any ;; faces declared above via `custom-declare-face'. (defface font-lock-comment-face ! '((((type tty pc) (class color) (background light)) (:foreground "red")) ! (((type tty pc) (class color) (background dark)) (:foreground "red1")) ! (((class grayscale) (background light)) (:foreground "DimGray" :weight bold :slant italic)) (((class grayscale) (background dark)) (:foreground "LightGray" :weight bold :slant italic)) ! (((class color) (background light)) (:foreground "Firebrick")) ! (((class color) (background dark)) (:foreground "chocolate1")) (t (:weight bold :slant italic))) "Font Lock mode face used to highlight comments." :group 'font-lock-highlighting-faces) (defface font-lock-string-face ! '((((type tty) (class color)) (:foreground "green")) ! (((class grayscale) (background light)) (:foreground "DimGray" :slant italic)) (((class grayscale) (background dark)) (:foreground "LightGray" :slant italic)) ! (((class color) (background light)) (:foreground "RosyBrown")) ! (((class color) (background dark)) (:foreground "LightSalmon")) (t (:slant italic))) "Font Lock mode face used to highlight strings." :group 'font-lock-highlighting-faces) --- 1560,1587 ---- ;; But now we do it the custom way. Note that `defface' will not overwrite any ;; faces declared above via `custom-declare-face'. (defface font-lock-comment-face ! '((((class grayscale) (background light)) (:foreground "DimGray" :weight bold :slant italic)) (((class grayscale) (background dark)) (:foreground "LightGray" :weight bold :slant italic)) ! (((class color) (min-colors 88) (background light)) ! (:foreground "Firebrick")) ! (((class color) (min-colors 88) (background dark)) ! (:foreground "chocolate1")) ! (((class color) (min-colors 8) (background light)) ! (:foreground "red")) ! (((class color) (min-colors 8) (background dark)) ! (:foreground "red1")) (t (:weight bold :slant italic))) "Font Lock mode face used to highlight comments." :group 'font-lock-highlighting-faces) (defface font-lock-string-face ! '((((class grayscale) (background light)) (:foreground "DimGray" :slant italic)) (((class grayscale) (background dark)) (:foreground "LightGray" :slant italic)) ! (((class color) (min-colors 88) (background light)) (:foreground "RosyBrown")) ! (((class color) (min-colors 88) (background dark)) (:foreground "LightSalmon")) ! (((class color) (min-colors 8)) (:foreground "green")) (t (:slant italic))) "Font Lock mode face used to highlight strings." :group 'font-lock-highlighting-faces) *************** Sets various variables using `font-lock- *** 1588,1658 **** :group 'font-lock-highlighting-faces) (defface font-lock-keyword-face ! '((((type tty) (class color)) (:foreground "cyan" :weight bold)) ! (((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) ! (((class color) (background light)) (:foreground "Purple")) ! (((class color) (background dark)) (:foreground "Cyan")) (t (:weight bold))) "Font Lock mode face used to highlight keywords." :group 'font-lock-highlighting-faces) (defface font-lock-builtin-face ! '((((type tty) (class color)) (:foreground "blue" :weight light)) ! (((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) ! (((class color) (background light)) (:foreground "Orchid")) ! (((class color) (background dark)) (:foreground "LightSteelBlue")) (t (:weight bold))) "Font Lock mode face used to highlight builtins." :group 'font-lock-highlighting-faces) (defface font-lock-function-name-face ! '((((type tty) (class color)) (:foreground "blue" :weight bold)) ! (((class color) (background light)) (:foreground "Blue")) ! (((class color) (background dark)) (:foreground "LightSkyBlue")) (t (:inverse-video t :weight bold))) "Font Lock mode face used to highlight function names." :group 'font-lock-highlighting-faces) (defface font-lock-variable-name-face ! '((((type tty) (class color)) (:foreground "yellow" :weight light)) ! (((class grayscale) (background light)) (:foreground "Gray90" :weight bold :slant italic)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold :slant italic)) ! (((class color) (background light)) (:foreground "DarkGoldenrod")) ! (((class color) (background dark)) (:foreground "LightGoldenrod")) (t (:weight bold :slant italic))) "Font Lock mode face used to highlight variable names." :group 'font-lock-highlighting-faces) (defface font-lock-type-face ! '((((type tty) (class color)) (:foreground "green")) ! (((class grayscale) (background light)) (:foreground "Gray90" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) ! (((class color) (background light)) (:foreground "ForestGreen")) ! (((class color) (background dark)) (:foreground "PaleGreen")) (t (:weight bold :underline t))) "Font Lock mode face used to highlight type and classes." :group 'font-lock-highlighting-faces) (defface font-lock-constant-face ! '((((type tty) (class color)) (:foreground "magenta")) ! (((class grayscale) (background light)) (:foreground "LightGray" :weight bold :underline t)) (((class grayscale) (background dark)) (:foreground "Gray50" :weight bold :underline t)) ! (((class color) (background light)) (:foreground "CadetBlue")) ! (((class color) (background dark)) (:foreground "Aquamarine")) (t (:weight bold :underline t))) "Font Lock mode face used to highlight constants and labels." :group 'font-lock-highlighting-faces) (defface font-lock-warning-face ! '((((type tty) (class color)) (:foreground "red")) ! (((class color) (background light)) (:foreground "Red" :weight bold)) ! (((class color) (background dark)) (:foreground "Pink" :weight bold)) (t (:inverse-video t :weight bold))) "Font Lock mode face used to highlight warnings." :group 'font-lock-highlighting-faces) --- 1592,1662 ---- :group 'font-lock-highlighting-faces) (defface font-lock-keyword-face ! '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) ! (((class color) (min-colors 88) (background light)) (:foreground "Purple")) ! (((class color) (min-colors 88) (background dark)) (:foreground "Cyan")) ! (((class color) (min-colors 8)) (:foreground "cyan" :weight bold)) (t (:weight bold))) "Font Lock mode face used to highlight keywords." :group 'font-lock-highlighting-faces) (defface font-lock-builtin-face ! '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) ! (((class color) (min-colors 88) (background light)) (:foreground "Orchid")) ! (((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue")) ! (((class color) (min-colors 8)) (:foreground "blue" :weight bold)) (t (:weight bold))) "Font Lock mode face used to highlight builtins." :group 'font-lock-highlighting-faces) (defface font-lock-function-name-face ! '((((class color) (min-colors 88) (background light)) (:foreground "Blue")) ! (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) ! (((class color) (min-colors 8)) (:foreground "blue" :weight bold)) (t (:inverse-video t :weight bold))) "Font Lock mode face used to highlight function names." :group 'font-lock-highlighting-faces) (defface font-lock-variable-name-face ! '((((class grayscale) (background light)) (:foreground "Gray90" :weight bold :slant italic)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold :slant italic)) ! (((class color) (min-colors 88) (background light)) (:foreground "DarkGoldenrod")) ! (((class color) (min-colors 88) (background dark)) (:foreground "LightGoldenrod")) ! (((class color) (min-colors 8)) (:foreground "yellow" :weight light)) (t (:weight bold :slant italic))) "Font Lock mode face used to highlight variable names." :group 'font-lock-highlighting-faces) (defface font-lock-type-face ! '((((class grayscale) (background light)) (:foreground "Gray90" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) ! (((class color) (min-colors 88) (background light)) (:foreground "ForestGreen")) ! (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen")) ! (((class color) (min-colors 8)) (:foreground "green")) (t (:weight bold :underline t))) "Font Lock mode face used to highlight type and classes." :group 'font-lock-highlighting-faces) (defface font-lock-constant-face ! '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold :underline t)) (((class grayscale) (background dark)) (:foreground "Gray50" :weight bold :underline t)) ! (((class color) (min-colors 88) (background light)) (:foreground "CadetBlue")) ! (((class color) (min-colors 88) (background dark)) (:foreground "Aquamarine")) ! (((class color) (min-colors 8)) (:foreground "magenta")) (t (:weight bold :underline t))) "Font Lock mode face used to highlight constants and labels." :group 'font-lock-highlighting-faces) (defface font-lock-warning-face ! '((((class color) (min-colors 88) (background light)) (:foreground "Red" :weight bold)) ! (((class color) (min-colors 88) (background dark)) (:foreground "Pink" :weight bold)) ! (((class color) (min-colors 8)) (:foreground "red")) (t (:inverse-video t :weight bold))) "Font Lock mode face used to highlight warnings." :group 'font-lock-highlighting-faces) Index: lisp/isearch.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/isearch.el,v retrieving revision 1.223 diff -c -3 -p -r1.223 isearch.el *** lisp/isearch.el 1 Nov 2003 17:00:02 -0000 1.223 --- lisp/isearch.el 12 Feb 2004 21:42:11 -0000 *************** A value of nil means highlight all match *** 2128,2153 **** :group 'isearch) (defface isearch ! '((((type tty pc) (class color)) ! (:background "magenta4" :foreground "cyan1")) ! (((class color) (background light)) ;; The background must not be too dark, for that means ;; the character is hard to see when the cursor is there. (:background "magenta2" :foreground "lightskyblue1")) ! (((class color) (background dark)) (:background "palevioletred2" :foreground "brown4")) (t (:inverse-video t))) "Face for highlighting Isearch matches." :group 'isearch-faces) (defvar isearch 'isearch) (defface isearch-lazy-highlight-face ! '((((type tty pc) (class color)) ! (:background "turquoise3")) ! (((class color) (background light)) (:background "paleturquoise")) ! (((class color) (background dark)) (:background "paleturquoise4")) (t (:underline t))) "Face for lazy highlighting of Isearch matches other than the current one." :group 'isearch-faces) --- 2128,2153 ---- :group 'isearch) (defface isearch ! '((((class color) (min-colors 88) (background light)) ;; The background must not be too dark, for that means ;; the character is hard to see when the cursor is there. (:background "magenta2" :foreground "lightskyblue1")) ! (((class color) (min-colors 88) (background dark)) (:background "palevioletred2" :foreground "brown4")) + (((class color) (min-colors 8)) + (:background "magenta4" :foreground "cyan1")) (t (:inverse-video t))) "Face for highlighting Isearch matches." :group 'isearch-faces) (defvar isearch 'isearch) (defface isearch-lazy-highlight-face ! '((((class color) (min-colors 88) (background light)) (:background "paleturquoise")) ! (((class color) (min-colors 88) (background dark)) (:background "paleturquoise4")) + (((class color) (min-colors 8)) + (:background "turquoise3")) (t (:underline t))) "Face for lazy highlighting of Isearch matches other than the current one." :group 'isearch-faces) Index: lispref/display.texi =================================================================== RCS file: /cvsroot/emacs/emacs/lispref/display.texi,v retrieving revision 1.112 diff -c -3 -p -r1.112 display.texi *** lispref/display.texi 6 Feb 2004 09:23:38 -0000 1.112 --- lispref/display.texi 12 Feb 2004 21:42:11 -0000 *************** What kinds of colors the frame supports- *** 1613,1618 **** --- 1613,1622 ---- @item background The kind of background---either @code{light} or @code{dark}. + @item min-colors + An integer that represents the minimum number of colors the frame should + support, it is compared with the result of @code{display-color-cells}. + @item supports Whether or not the frame can display the face attributes given in @var{value}@dots{} (@pxref{Face Attributes}). See the documentation --=-=-= Content-Disposition: attachment; filename=PATCH.both_min-colors.max-colors Content-Description: Patch that implements both min-colors and max-colors For the etc/NEWS file, I don't know where this would fit, so it's not a patch. New attributes `min-colors' adn `max-colors' have been added to the `defface' face specification language. They are used to specify the face characteristics depending on the number of colors supported by the display. lisp/ChangeLog 2004-02-12 Dan Nicolaescu * faces.el (face-spec-set-match-display): Add a new attributes, `min-colors' and `max-colors'. (region, highlight, secondary-selection): Use `min-colors`. * custom.el (defface): Add documentation for `min-colors' and `max-colors`. * font-lock.el (font-lock-comment-face, font-lock-string-face, font-lock-keyword-face, font-lock-function-name-face, font-lock-variable-name-face, font-lock-constant-face): Use `min-colors`. * isearch.el (isearch, isearch-lazy-highlight-face): Use `min-colors'. lispref/ChangeLog 2004-02-12 Dan Nicolaescu * display.texi (Defining Faces): Add description for min-colors and max-colors. Index: lisp/faces.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v retrieving revision 1.280 diff -c -3 -p -r1.280 faces.el *** lisp/faces.el 1 Sep 2003 15:45:11 -0000 1.280 --- lisp/faces.el 12 Feb 2004 21:48:47 -0000 *************** If FRAME is nil, the current FRAME is us *** 1314,1319 **** --- 1314,1323 ---- (not (featurep 'motif))) (and (memq 'x-toolkit options) (featurep 'x-toolkit)))) + ((eq req 'min-colors) + (>= (display-color-cells frame) (car options))) + ((eq req 'max-colors) + (<= (display-color-cells frame) (car options))) ((eq req 'class) (memq (frame-parameter frame 'display-type) options)) ((eq req 'background) *************** created." *** 1892,1905 **** (append minibuffer-prompt-properties (list 'face 'minibuffer-prompt))) (defface region ! '((((type tty) (class color)) :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" --- 1896,1909 ---- (append minibuffer-prompt-properties (list 'face 'minibuffer-prompt))) (defface region ! '((((class color) (min-colors 88) (background dark)) ! :background "blue3") ! (((class color) (min-colors 88) (background light)) ! :background "lightgoldenrod2") ! (((class color) (min-colors 8)) :background "blue" :foreground "white") (((type tty) (class mono)) :inverse-video t) (t :background "gray")) "Basic face for highlighting the region." :version "21.1" *************** created." *** 1990,2013 **** (defface highlight ! '((((type tty) (class color)) ! :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)) ! :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) --- 1994,2017 ---- (defface highlight ! '((((class color) (min-colors 88) (background light)) :background "darkseagreen2") ! (((class color) (min-colors 88) (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 ! '((((class color) (min-colors 88) (background light)) :background "yellow") ! (((class color) (min-colors 88) (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) Index: lisp/custom.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/custom.el,v retrieving revision 1.70 diff -c -3 -p -r1.70 custom.el *** lisp/custom.el 29 Dec 2003 11:53:19 -0000 1.70 --- lisp/custom.el 12 Feb 2004 21:48:47 -0000 *************** following REQ are defined: *** 306,311 **** --- 306,319 ---- `background' (what color is used for the background text) Should be one of `light' or `dark'. + `min-colors' (the minimum number of colors the frame should support) + Should be an integer, it is compared with the result of + `display-color-cells'. + + `max-colors' (the maximum number of colors the frame should support) + Should be an integer, it is compared with the result of + `display-color-cells'. + Read the section about customization in the Emacs Lisp manual for more information." ;; It is better not to use backquote in this file, Index: lisp/font-lock.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/font-lock.el,v retrieving revision 1.214 diff -c -3 -p -r1.214 font-lock.el *** lisp/font-lock.el 26 Jan 2004 23:03:43 -0000 1.214 --- lisp/font-lock.el 12 Feb 2004 21:48:47 -0000 *************** Sets various variables using `font-lock- *** 1560,1583 **** ;; But now we do it the custom way. Note that `defface' will not overwrite any ;; faces declared above via `custom-declare-face'. (defface font-lock-comment-face ! '((((type tty pc) (class color) (background light)) (:foreground "red")) ! (((type tty pc) (class color) (background dark)) (:foreground "red1")) ! (((class grayscale) (background light)) (:foreground "DimGray" :weight bold :slant italic)) (((class grayscale) (background dark)) (:foreground "LightGray" :weight bold :slant italic)) ! (((class color) (background light)) (:foreground "Firebrick")) ! (((class color) (background dark)) (:foreground "chocolate1")) (t (:weight bold :slant italic))) "Font Lock mode face used to highlight comments." :group 'font-lock-highlighting-faces) (defface font-lock-string-face ! '((((type tty) (class color)) (:foreground "green")) ! (((class grayscale) (background light)) (:foreground "DimGray" :slant italic)) (((class grayscale) (background dark)) (:foreground "LightGray" :slant italic)) ! (((class color) (background light)) (:foreground "RosyBrown")) ! (((class color) (background dark)) (:foreground "LightSalmon")) (t (:slant italic))) "Font Lock mode face used to highlight strings." :group 'font-lock-highlighting-faces) --- 1560,1587 ---- ;; But now we do it the custom way. Note that `defface' will not overwrite any ;; faces declared above via `custom-declare-face'. (defface font-lock-comment-face ! '((((class grayscale) (background light)) (:foreground "DimGray" :weight bold :slant italic)) (((class grayscale) (background dark)) (:foreground "LightGray" :weight bold :slant italic)) ! (((class color) (min-colors 88) (background light)) ! (:foreground "Firebrick")) ! (((class color) (min-colors 88) (background dark)) ! (:foreground "chocolate1")) ! (((class color) (min-colors 8) (background light)) ! (:foreground "red")) ! (((class color) (min-colors 8) (background dark)) ! (:foreground "red1")) (t (:weight bold :slant italic))) "Font Lock mode face used to highlight comments." :group 'font-lock-highlighting-faces) (defface font-lock-string-face ! '((((class grayscale) (background light)) (:foreground "DimGray" :slant italic)) (((class grayscale) (background dark)) (:foreground "LightGray" :slant italic)) ! (((class color) (min-colors 88) (background light)) (:foreground "RosyBrown")) ! (((class color) (min-colors 88) (background dark)) (:foreground "LightSalmon")) ! (((class color) (min-colors 8)) (:foreground "green")) (t (:slant italic))) "Font Lock mode face used to highlight strings." :group 'font-lock-highlighting-faces) *************** Sets various variables using `font-lock- *** 1588,1658 **** :group 'font-lock-highlighting-faces) (defface font-lock-keyword-face ! '((((type tty) (class color)) (:foreground "cyan" :weight bold)) ! (((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) ! (((class color) (background light)) (:foreground "Purple")) ! (((class color) (background dark)) (:foreground "Cyan")) (t (:weight bold))) "Font Lock mode face used to highlight keywords." :group 'font-lock-highlighting-faces) (defface font-lock-builtin-face ! '((((type tty) (class color)) (:foreground "blue" :weight light)) ! (((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) ! (((class color) (background light)) (:foreground "Orchid")) ! (((class color) (background dark)) (:foreground "LightSteelBlue")) (t (:weight bold))) "Font Lock mode face used to highlight builtins." :group 'font-lock-highlighting-faces) (defface font-lock-function-name-face ! '((((type tty) (class color)) (:foreground "blue" :weight bold)) ! (((class color) (background light)) (:foreground "Blue")) ! (((class color) (background dark)) (:foreground "LightSkyBlue")) (t (:inverse-video t :weight bold))) "Font Lock mode face used to highlight function names." :group 'font-lock-highlighting-faces) (defface font-lock-variable-name-face ! '((((type tty) (class color)) (:foreground "yellow" :weight light)) ! (((class grayscale) (background light)) (:foreground "Gray90" :weight bold :slant italic)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold :slant italic)) ! (((class color) (background light)) (:foreground "DarkGoldenrod")) ! (((class color) (background dark)) (:foreground "LightGoldenrod")) (t (:weight bold :slant italic))) "Font Lock mode face used to highlight variable names." :group 'font-lock-highlighting-faces) (defface font-lock-type-face ! '((((type tty) (class color)) (:foreground "green")) ! (((class grayscale) (background light)) (:foreground "Gray90" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) ! (((class color) (background light)) (:foreground "ForestGreen")) ! (((class color) (background dark)) (:foreground "PaleGreen")) (t (:weight bold :underline t))) "Font Lock mode face used to highlight type and classes." :group 'font-lock-highlighting-faces) (defface font-lock-constant-face ! '((((type tty) (class color)) (:foreground "magenta")) ! (((class grayscale) (background light)) (:foreground "LightGray" :weight bold :underline t)) (((class grayscale) (background dark)) (:foreground "Gray50" :weight bold :underline t)) ! (((class color) (background light)) (:foreground "CadetBlue")) ! (((class color) (background dark)) (:foreground "Aquamarine")) (t (:weight bold :underline t))) "Font Lock mode face used to highlight constants and labels." :group 'font-lock-highlighting-faces) (defface font-lock-warning-face ! '((((type tty) (class color)) (:foreground "red")) ! (((class color) (background light)) (:foreground "Red" :weight bold)) ! (((class color) (background dark)) (:foreground "Pink" :weight bold)) (t (:inverse-video t :weight bold))) "Font Lock mode face used to highlight warnings." :group 'font-lock-highlighting-faces) --- 1592,1662 ---- :group 'font-lock-highlighting-faces) (defface font-lock-keyword-face ! '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) ! (((class color) (min-colors 88) (background light)) (:foreground "Purple")) ! (((class color) (min-colors 88) (background dark)) (:foreground "Cyan")) ! (((class color) (min-colors 8)) (:foreground "cyan" :weight bold)) (t (:weight bold))) "Font Lock mode face used to highlight keywords." :group 'font-lock-highlighting-faces) (defface font-lock-builtin-face ! '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) ! (((class color) (min-colors 88) (background light)) (:foreground "Orchid")) ! (((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue")) ! (((class color) (min-colors 8)) (:foreground "blue" :weight bold)) (t (:weight bold))) "Font Lock mode face used to highlight builtins." :group 'font-lock-highlighting-faces) (defface font-lock-function-name-face ! '((((class color) (min-colors 88) (background light)) (:foreground "Blue")) ! (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) ! (((class color) (min-colors 8)) (:foreground "blue" :weight bold)) (t (:inverse-video t :weight bold))) "Font Lock mode face used to highlight function names." :group 'font-lock-highlighting-faces) (defface font-lock-variable-name-face ! '((((class grayscale) (background light)) (:foreground "Gray90" :weight bold :slant italic)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold :slant italic)) ! (((class color) (min-colors 88) (background light)) (:foreground "DarkGoldenrod")) ! (((class color) (min-colors 88) (background dark)) (:foreground "LightGoldenrod")) ! (((class color) (min-colors 8)) (:foreground "yellow" :weight light)) (t (:weight bold :slant italic))) "Font Lock mode face used to highlight variable names." :group 'font-lock-highlighting-faces) (defface font-lock-type-face ! '((((class grayscale) (background light)) (:foreground "Gray90" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) ! (((class color) (min-colors 88) (background light)) (:foreground "ForestGreen")) ! (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen")) ! (((class color) (min-colors 8)) (:foreground "green")) (t (:weight bold :underline t))) "Font Lock mode face used to highlight type and classes." :group 'font-lock-highlighting-faces) (defface font-lock-constant-face ! '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold :underline t)) (((class grayscale) (background dark)) (:foreground "Gray50" :weight bold :underline t)) ! (((class color) (min-colors 88) (background light)) (:foreground "CadetBlue")) ! (((class color) (min-colors 88) (background dark)) (:foreground "Aquamarine")) ! (((class color) (min-colors 8)) (:foreground "magenta")) (t (:weight bold :underline t))) "Font Lock mode face used to highlight constants and labels." :group 'font-lock-highlighting-faces) (defface font-lock-warning-face ! '((((class color) (min-colors 88) (background light)) (:foreground "Red" :weight bold)) ! (((class color) (min-colors 88) (background dark)) (:foreground "Pink" :weight bold)) ! (((class color) (min-colors 8)) (:foreground "red")) (t (:inverse-video t :weight bold))) "Font Lock mode face used to highlight warnings." :group 'font-lock-highlighting-faces) Index: lisp/isearch.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/isearch.el,v retrieving revision 1.223 diff -c -3 -p -r1.223 isearch.el *** lisp/isearch.el 1 Nov 2003 17:00:02 -0000 1.223 --- lisp/isearch.el 12 Feb 2004 21:48:48 -0000 *************** A value of nil means highlight all match *** 2128,2153 **** :group 'isearch) (defface isearch ! '((((type tty pc) (class color)) ! (:background "magenta4" :foreground "cyan1")) ! (((class color) (background light)) ;; The background must not be too dark, for that means ;; the character is hard to see when the cursor is there. (:background "magenta2" :foreground "lightskyblue1")) ! (((class color) (background dark)) (:background "palevioletred2" :foreground "brown4")) (t (:inverse-video t))) "Face for highlighting Isearch matches." :group 'isearch-faces) (defvar isearch 'isearch) (defface isearch-lazy-highlight-face ! '((((type tty pc) (class color)) ! (:background "turquoise3")) ! (((class color) (background light)) (:background "paleturquoise")) ! (((class color) (background dark)) (:background "paleturquoise4")) (t (:underline t))) "Face for lazy highlighting of Isearch matches other than the current one." :group 'isearch-faces) --- 2128,2153 ---- :group 'isearch) (defface isearch ! '((((class color) (min-colors 88) (background light)) ;; The background must not be too dark, for that means ;; the character is hard to see when the cursor is there. (:background "magenta2" :foreground "lightskyblue1")) ! (((class color) (min-colors 88) (background dark)) (:background "palevioletred2" :foreground "brown4")) + (((class color) (min-colors 8)) + (:background "magenta4" :foreground "cyan1")) (t (:inverse-video t))) "Face for highlighting Isearch matches." :group 'isearch-faces) (defvar isearch 'isearch) (defface isearch-lazy-highlight-face ! '((((class color) (min-colors 88) (background light)) (:background "paleturquoise")) ! (((class color) (min-colors 88) (background dark)) (:background "paleturquoise4")) + (((class color) (min-colors 8)) + (:background "turquoise3")) (t (:underline t))) "Face for lazy highlighting of Isearch matches other than the current one." :group 'isearch-faces) Index: lispref/display.texi =================================================================== RCS file: /cvsroot/emacs/emacs/lispref/display.texi,v retrieving revision 1.112 diff -c -3 -p -r1.112 display.texi *** lispref/display.texi 6 Feb 2004 09:23:38 -0000 1.112 --- lispref/display.texi 12 Feb 2004 21:48:48 -0000 *************** What kinds of colors the frame supports- *** 1613,1618 **** --- 1613,1626 ---- @item background The kind of background---either @code{light} or @code{dark}. + @item min-colors + An integer that represents the minimum number of colors the frame should + support, it is compared with the result of @code{display-color-cells}. + + @item max-colors + An integer that represents the maximum number of colors the frame should + support, it is compared with the result of @code{display-color-cells}. + @item supports Whether or not the frame can display the face attributes given in @var{value}@dots{} (@pxref{Face Attributes}). See the documentation --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel --=-=-=--