emacs-devel
[Top][All Lists]
Advanced

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

Re: Font lock & RMAIL enhancement patch


From: Eli Zaretskii
Subject: Re: Font lock & RMAIL enhancement patch
Date: Fri, 30 Nov 2001 10:47:09 +0200

> From: "Eric M. Ludlam" <address@hidden>
> Date: Thu, 29 Nov 2001 23:16:41 -0500
> 
> I was playing around with faces and noticed that Emacs 21 supports the
> nifty `strike-through' feature for faces, but it doesn't seem to be
> used.  The following patch adds a `deleted-face' to font lock which
> uses strike through, and then uses it for deleted messages in RMAIL.
> [...]
> + (defface font-lock-deleted-face
> +   '((((type tty) (class color)) (:underline t))
> +     (((class color) (background light)) (:strike-through "Red"))
> +     (((class color) (background dark)) (:strike-through "Pink"))
> +     (t (:inverse-video t)))
> +   "Font Lock mode face used to highlight deleted information."
> +   :group 'font-lock-highlighting-faces)

Don't we want the deleted face to be _less_, rather than more,
conspicuous?  The above definition will make the deleted messages
stand out on any display that doesn't support strike-through, since
underline and inverse-video both stand out.  Also, the colors chosen
for the X case are too bright, IMHO.  In addition, some display types
which aren't tty don't support strike-through.

So how about the following definition:

 (defface font-lock-deleted-face
   '((((type tty) (class color)) (:foreground "green"))
     (((type pc) (class color)) (:foreground "gray50"))
     (((class color) (background light))
       (:strike-through t :foreground "gray50"))
     (((class color) (background dark)) 
       (:strike-through t :foreground "gray30"))
     (((class grayscale) (background light))
       (:strike-through t :foreground "DimGray"))
     (((class grayscale) (background dark))
       (:strike-through t :foreground "LightGray"))
     (t (:italic t)))
   "Font Lock mode face used to highlight deleted information."
   :group 'font-lock-highlighting-faces)

This reuses the definitions of font-lock-string-face for those types
of display which don't support neither strike-through nor a dim gray
color.



reply via email to

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