[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19451: compare-windows faces

From: Juri Linkov
Subject: bug#19451: compare-windows faces
Date: Sat, 27 Dec 2014 03:14:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu)

Since compare-windows is closely related to diff-mode and ediff
it would make sense to use diff faces in compare-windows:

diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el
index 3b8293c..a8c68e6 100644
--- a/lisp/vc/compare-w.el
+++ b/lisp/vc/compare-w.el
@@ -128,11 +128,19 @@ (defcustom compare-windows-highlight t
   :group 'compare-windows
   :version "22.1")
-(defface compare-windows
-  '((t :inherit lazy-highlight))
-  "Face for highlighting of compare-windows difference regions."
+(defface compare-windows-removed
+  '((t :inherit diff-removed))
+  "Face for highlighting of compare-windows removed regions."
   :group 'compare-windows
-  :version "22.1")
+  :version "25.1")
+(defface compare-windows-added
+  '((t :inherit diff-added))
+  "Face for highlighting of compare-windows added regions."
+  :group 'compare-windows
+  :version "25.1")
+(define-obsolete-face-alias 'compare-windows 'compare-windows-added "25.1")
 (defvar compare-windows-overlay1 nil)
 (defvar compare-windows-overlay2 nil)
@@ -393,13 +401,13 @@ (defun compare-windows-highlight (beg1 end1 b1 w1 beg2 
end2 b2 w2)
     (if compare-windows-overlay1
         (move-overlay compare-windows-overlay1 beg1 end1 b1)
       (setq compare-windows-overlay1 (make-overlay beg1 end1 b1))
-      (overlay-put compare-windows-overlay1 'face 'compare-windows)
+      (overlay-put compare-windows-overlay1 'face 'compare-windows-added)
       (overlay-put compare-windows-overlay1 'priority 1000))
     (overlay-put compare-windows-overlay1 'window w1)
     (if compare-windows-overlay2
         (move-overlay compare-windows-overlay2 beg2 end2 b2)
       (setq compare-windows-overlay2 (make-overlay beg2 end2 b2))
-      (overlay-put compare-windows-overlay2 'face 'compare-windows)
+      (overlay-put compare-windows-overlay2 'face 'compare-windows-removed)
       (overlay-put compare-windows-overlay2 'priority 1000))
     (overlay-put compare-windows-overlay2 'window w2)
     (if (not (eq compare-windows-highlight 'persistent))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]