emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

avoid using (type tty) in defface


From: Dan Nicolaescu
Subject: avoid using (type tty) in defface
Date: Thu, 29 Apr 2004 10:31:20 -0700

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  <address@hidden>

        * 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]