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: avoid using (type tty) in defface Date: Thu, 29 Apr 2004 10:31:20 -0700 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200404291731.i3THVIGK013069@scanner2.ics.uci.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083267855 15475 80.91.224.253 (29 Apr 2004 19:44:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Apr 2004 19:44:15 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Apr 29 21:44:05 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 1BJHS1-0001ph-00 for ; Thu, 29 Apr 2004 21:44:05 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BJHS0-0003ek-00 for ; Thu, 29 Apr 2004 21:44:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BJHRv-0003XP-7I for emacs-devel@quimby.gnus.org; Thu, 29 Apr 2004 15:43:59 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BJGqx-0007q4-00 for emacs-devel@gnu.org; Thu, 29 Apr 2004 15:05:47 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BJGSl-0001Oi-Q7 for emacs-devel@gnu.org; Thu, 29 Apr 2004 14:41:18 -0400 Original-Received: from [128.195.1.36] (helo=scanner2.ics.uci.edu) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BJFO5-0000f2-Oq for emacs-devel@gnu.org; Thu, 29 Apr 2004 13:31:53 -0400 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 i3THVIGK013069 for ; Thu, 29 Apr 2004 10:31:18 -0700 (PDT) Original-To: emacs-devel@gnu.org Original-Lines: 71 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-100, required 5, USER_IN_WHITELIST) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 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:22377 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22377 Since Emacs supports terminals with a high number of colors (>88 colors), using (type tty) in defface definitions is not always desired. In most cases (type tty) used to synonymous with "supports a small number of colors", which is not true anymore. It is better to define faces based on the number of colors the display support. For example see how faces are defined in font-lock.el Here is a list of files that make use of (type tty) that might need to be changed: compare-w.el diff-mode.el ediff-init.el ruler-mode.el wid-edit.el mh-e/mh-customize.el The patch below fixes the deffaces in compile.el Iff it's OK, please apply it. 2004-04-29 Dan Nicolaescu * progmodes/compile.el (compilation-warning-face) (compilation-info-face): Use min-colors. *** compile.el 29 Apr 2004 07:28:48 -0700 1.309 --- compile.el 29 Apr 2004 07:52:33 -0700 *************** *** 445,461 **** (defvar compile-history nil) (defface compilation-warning-face ! '((((type tty) (class color)) (:foreground "cyan" :weight bold)) ! (((class color)) (:foreground "Orange" :weight bold)) (t (:weight bold))) "Face used to highlight compiler warnings." :group 'font-lock-highlighting-faces :version "21.4") (defface compilation-info-face ! '((((type tty) (class color)) (:foreground "green" :weight bold)) ! (((class color) (background light)) (:foreground "Green3" :weight bold)) ! (((class color) (background dark)) (:foreground "Green" :weight bold)) (t (:weight bold))) "Face used to highlight compiler warnings." :group 'font-lock-highlighting-faces --- 445,463 ---- (defvar compile-history nil) (defface compilation-warning-face ! '((((class color) (min-colors 16)) (:foreground "Orange" :weight bold)) ! (((class color)) (:foreground "cyan" :weight bold)) (t (:weight bold))) "Face used to highlight compiler warnings." :group 'font-lock-highlighting-faces :version "21.4") (defface compilation-info-face ! '((((class color) (min-colors 16) (background light)) ! (:foreground "Green3" :weight bold)) ! (((class color) (min-colors 16) (background dark)) ! (:foreground "Green" :weight bold)) ! (((class color)) (:foreground "green" :weight bold)) (t (:weight bold))) "Face used to highlight compiler warnings." :group 'font-lock-highlighting-faces