Fix diff-changed face definition.
authorChong Yidong <cyd@stupidchicken.com>
Sun, 22 May 2011 19:22:37 +0000 (15:22 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 22 May 2011 19:22:37 +0000 (15:22 -0400)
* lisp/vc/diff-mode.el (diff-changed): Don't use terminal specs for
defface (Bug#8144).

lisp/ChangeLog
lisp/vc/diff-mode.el

index 5b0fa09..ea1c659 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-22  Chong Yidong  <cyd@stupidchicken.com>
+
+       * vc/diff-mode.el (diff-changed): Don't use terminal specs for
+       defface (Bug#8144).
+
 2011-05-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/macroexp.el (macroexpand-all-1): Convert ' to #' for
index 56ebe86..392973e 100644 (file)
@@ -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)