unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* avoid using (type tty) in defface
@ 2004-04-29 17:31 Dan Nicolaescu
  2004-05-01  9:44 ` Richard Stallman
  2004-05-15 13:16 ` avoid using (type tty) in defface Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Dan Nicolaescu @ 2004-04-29 17:31 UTC (permalink / raw)



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  <dann@ics.uci.edu>

	* 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-09-17 21:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-29 17:31 avoid using (type tty) in defface Dan Nicolaescu
2004-05-01  9:44 ` Richard Stallman
2004-05-03 17:00   ` Dan Nicolaescu
2004-05-03 19:10     ` Eli Zaretskii
2004-05-15 13:23     ` Eli Zaretskii
2004-05-15 18:09       ` avoid using (type tty) in ediff [was: Re: avoid using (type tty) in defface] Dan Nicolaescu
2004-09-16 21:53         ` Dan Nicolaescu
2004-09-17 21:28           ` avoid using (type tty) in ediff Kim F. Storm
2004-09-17 21:40             ` Andreas Schwab
2004-09-17 21:55               ` Kim F. Storm
2004-05-15 13:16 ` avoid using (type tty) in defface Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).