From d5b44c937b53864aa35d9ad290196f16bbd9cb4f Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 22 May 2011 15:22:37 -0400 Subject: [PATCH] Fix diff-changed face definition. * lisp/vc/diff-mode.el (diff-changed): Don't use terminal specs for defface (Bug#8144). --- lisp/ChangeLog | 5 +++++ lisp/vc/diff-mode.el | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b0fa090eaa..ea1c659a89e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-05-22 Chong Yidong + + * vc/diff-mode.el (diff-changed): Don't use terminal specs for + defface (Bug#8144). + 2011-05-22 Stefan Monnier * emacs-lisp/macroexp.el (macroexpand-all-1): Convert ' to #' for diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 56ebe868a2d..392973e08fe 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -295,9 +295,14 @@ try to refine the current hunk, as well." (defvar diff-added-face 'diff-added) (defface diff-changed - '((((type tty pc) (class color) (background light)) + ;; We normally apply a `shadow'-based face on the `diff-context' + ;; face, and keep `diff-changed' the default. + '((((class color grayscale) (min-colors 88))) + ;; If the terminal lacks sufficient colors for shadowing, + ;; highlight changed lines explicitly. + (((class color) (background light)) :foreground "magenta" :weight bold :slant italic) - (((type tty pc) (class color) (background dark)) + (((class color) (background dark)) :foreground "yellow" :weight bold :slant italic)) "`diff-mode' face used to highlight changed lines." :group 'diff-mode) -- 2.39.2