unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: eliz@gnu.org, emacs-devel@gnu.org
Subject: Re: Diff mode faces
Date: Tue, 12 Jul 2005 09:51:05 +0300	[thread overview]
Message-ID: <87wtnw4isu.fsf@jurta.org> (raw)
In-Reply-To: <87slyllarb.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 11 Jul 2005 09:43:07 -0400")

>>  (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/

  parent reply	other threads:[~2005-07-12  6:51 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-17 11:47 Diff mode faces Juri Linkov
2005-06-17 13:11 ` Jason Rumney
2005-06-17 14:28 ` Stefan Monnier
2005-06-18 13:54   ` Juri Linkov
2005-06-17 14:34 ` Eli Zaretskii
2005-06-18 13:57   ` Juri Linkov
2005-06-18 15:27     ` Randal L. Schwartz
2005-06-18 16:46       ` Eli Zaretskii
2005-06-19 13:09         ` Juri Linkov
2005-06-19 19:58           ` Eli Zaretskii
2005-06-20  4:48             ` Juri Linkov
2005-06-20 20:18               ` Eli Zaretskii
2005-06-21 16:28                 ` Background mode (was: Diff mode faces) Juri Linkov
2005-06-27  0:03                   ` Background mode Juri Linkov
2005-06-27 16:46                     ` Richard M. Stallman
2005-06-27 23:52                       ` Juri Linkov
2005-06-28 18:47                         ` Richard M. Stallman
2005-06-29  3:55                           ` Stefan Monnier
2005-06-29 22:21                             ` Miles Bader
2005-06-30 17:45                               ` Stefan Monnier
2005-07-01  4:03                                 ` Richard M. Stallman
2005-07-01 15:01                                   ` Stefan Monnier
2005-06-27 23:55                     ` Juri Linkov
2005-06-19 13:05       ` Diff mode faces Juri Linkov
2005-06-19 17:10         ` Luc Teirlinck
2005-06-19 17:34           ` Randal L. Schwartz
2005-06-27 23:55           ` Juri Linkov
2005-06-28  4:57             ` Miles Bader
2005-07-01 23:59               ` Juri Linkov
2005-07-02  3:37                 ` Miles Bader
2005-07-05 19:11               ` Richard M. Stallman
2005-07-06 20:53                 ` Juri Linkov
2005-07-07  4:05                   ` Miles Bader
2005-07-07  6:03                     ` Juri Linkov
2005-07-07  4:42                   ` Eli Zaretskii
2005-07-09 20:56                     ` Juri Linkov
2005-07-10  3:34                       ` Eli Zaretskii
2005-07-11  0:06                         ` Juri Linkov
2005-07-11 13:43                           ` Stefan Monnier
2005-07-11 19:37                             ` Eli Zaretskii
2005-07-11 19:46                               ` Stefan Monnier
2005-07-12  3:33                                 ` Eli Zaretskii
2005-07-12  6:51                             ` Juri Linkov [this message]
2005-07-16 11:17                               ` Eli Zaretskii
2005-06-28 13:10             ` Randal L. Schwartz
2005-06-30 21:30             ` Richard M. Stallman
2005-06-30 21:30             ` Richard M. Stallman
2005-07-01 10:13               ` Eli Zaretskii
2005-07-01 23:59                 ` Juri Linkov
2005-07-03 18:56                   ` xterm colors (was: Diff mode faces) Gaëtan LEURENT
2005-07-04  5:59                     ` Eli Zaretskii
2005-07-04  6:17                     ` Richard M. Stallman
2005-07-01 23:59               ` Diff mode faces Juri Linkov
2005-06-20  0:25         ` Miles Bader
2005-06-18  2:21 ` Richard Stallman
2005-06-18 13:54   ` Juri Linkov
2005-06-19  3:51     ` Richard Stallman
2005-06-19 14:05       ` Juri Linkov
2005-06-20  3:50         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wtnw4isu.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).