]> code.delx.au - gnu-emacs/blobdiff - lisp/diff-mode.el
Merged in changes from CVS trunk.
[gnu-emacs] / lisp / diff-mode.el
index 176023179581974a5835a589c9d59a9e7c4b1f4e..9b00eae050d99fe958d9339fbb3e4c82a6b02c7a 100644 (file)
@@ -169,27 +169,27 @@ when editing big diffs)."
 ;;;;
 
 (defface diff-header-face
-  '((((type tty pc) (class color) (background light))
-     (:foreground "blue1" :weight bold))
-    (((type tty pc) (class color) (background dark))
-     (:foreground "green" :weight bold))
-    (((class color) (background light))
+  '((((class color) (min-colors 88) (background light))
      (:background "grey85"))
-    (((class color) (background dark))
+    (((class color) (min-colors 88) (background dark))
      (:background "grey45"))
+    (((class color) (background light))
+     (:foreground "blue1" :weight bold))
+    (((class color) (background dark))
+     (:foreground "green" :weight bold))
     (t (:weight bold)))
   "`diff-mode' face inherited by hunk and index header faces.")
 (defvar diff-header-face 'diff-header-face)
 
 (defface diff-file-header-face
-  '((((type tty pc) (class color) (background light))
-     (:foreground "yellow" :weight bold))
-    (((type tty pc) (class color) (background dark))
-     (:foreground "cyan" :weight bold))
-    (((class color) (background light))
+  '((((class color) (min-colors 88) (background light))
      (:background "grey70" :weight bold))
-    (((class color) (background dark))
+    (((class color) (min-colors 88) (background dark))
      (:background "grey60" :weight bold))
+    (((class color) (background light))
+     (:foreground "yellow" :weight bold))
+    (((class color) (background dark))
+     (:foreground "cyan" :weight bold))
     (t (:weight bold)))                        ; :height 1.3
   "`diff-mode' face used to highlight file header lines.")
 (defvar diff-file-header-face 'diff-file-header-face)
@@ -976,7 +976,7 @@ a diff with \\[diff-reverse-direction]."
   "Turn context diffs into unified diffs if applicable."
   (if (save-excursion
        (goto-char (point-min))
-       (looking-at "\\*\\*\\* "))
+       (and (looking-at diff-hunk-header-re) (eq (char-after) ?*)))
       (let ((mod (buffer-modified-p)))
        (unwind-protect
            (diff-context->unified (point-min) (point-max))