From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Diff mode faces Date: Tue, 12 Jul 2005 09:51:05 +0300 Organization: JURTA Message-ID: <87wtnw4isu.fsf@jurta.org> References: <87oea5urwm.fsf@jurta.org> <87psujj0h0.fsf@jurta.org> <86hdfv1y9b.fsf@blue.stonehenge.com> <87r7eyqzcy.fsf@jurta.org> <200506191710.j5JHAEN11479@raven.dms.auburn.edu> <877jgfi40l.fsf@jurta.org> <874qb7k65j.fsf@jurta.org> <87fyunwph1.fsf@jurta.org> <87mzoudrff.fsf@jurta.org> <87slyllarb.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1121157373 26576 80.91.229.2 (12 Jul 2005 08:36:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Jul 2005 08:36:13 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 12 10:36:13 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DsGF2-0006D5-Ho for ged-emacs-devel@m.gmane.org; Tue, 12 Jul 2005 10:35:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DsGGe-0002kN-7G for ged-emacs-devel@m.gmane.org; Tue, 12 Jul 2005 04:37:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DsFlx-0005yj-3Z for emacs-devel@gnu.org; Tue, 12 Jul 2005 04:05:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DsFlX-0005rT-Ei for emacs-devel@gnu.org; Tue, 12 Jul 2005 04:05:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DsFki-0005Up-7L for emacs-devel@gnu.org; Tue, 12 Jul 2005 04:04:28 -0400 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DsFpL-00066S-No; Tue, 12 Jul 2005 04:09:16 -0400 Original-Received: from mail.neti.ee (80-235-32-65-dsl.mus.estpak.ee [80.235.32.65]) by Relayhost2.neti.ee (Postfix) with ESMTP id 7E6DD1BAF; Tue, 12 Jul 2005 11:01:23 +0300 (EEST) Original-To: Stefan Monnier In-Reply-To: <87slyllarb.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 11 Jul 2005 09:43:07 -0400") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:40819 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40819 >> (defface diff-context >> - '((t :inherit shadow)) >> + '((((class color) (min-colors 88)) :inherit shadow)) >> "`diff-mode' face used to highlight context and other side-information." >> :group 'diff-mode) > > Maybe the shadow face should be fixed instead. The shadow face should be fixed too (and perhaps not `instead'). Such a fix will affect faces which inherit from the shadow face (like `tmm-inactive', `widget-inactive'). But as I understood from the discussion, `diff-mode' is exceptional: on terminals where shades of grey are not available, it should highlight changed lines, and not highlight context lines. What makes `diff-mode' different from other modes with faces inheriting from the shadow face, is that `diff-mode' has a special face for changed lines (which currently is set to the color different from the default foreground color on terminals), whereas other modes have no special faces for highlighting the normal text (i.e. the text other than highlighted with the shadow face). Here is a new patch: Index: lisp/faces.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v retrieving revision 1.329 diff -u -r1.329 faces.el --- lisp/faces.el 4 Jul 2005 23:08:54 -0000 1.329 +++ lisp/faces.el 12 Jul 2005 06:33:20 -0000 @@ -2149,8 +2148,10 @@ :version "22.1") (defface shadow - '((((background dark)) :foreground "grey70") - (((background light)) :foreground "grey50")) + '((((min-colors 88) (background light)) :foreground "grey50") + (((min-colors 88) (background dark)) :foreground "grey70") + (((background light)) :foreground "green") + (((background dark)) :foreground "yellow")) "Basic face for shadowed text." :group 'basic-faces :version "22.1") Index: lisp/diff-mode.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/diff-mode.el,v retrieving revision 1.78 diff -u -r1.78 diff-mode.el --- lisp/diff-mode.el 4 Jul 2005 23:08:52 -0000 1.78 +++ lisp/diff-mode.el 12 Jul 2005 06:35:03 -0000 @@ -259,7 +280,7 @@ (defvar diff-function-face 'diff-function) (defface diff-context - '((t :inherit shadow)) + '((((min-colors 88)) :inherit shadow)) "`diff-mode' face used to highlight context and other side-information." :group 'diff-mode) ;; backward-compatibility alias -- Juri Linkov http://www.jurta.org/emacs/