>> (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/ _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel