Subject: bug#19451: closed (Re: bug#19451: compare-windows faces)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 28 Dec 2014 00:49:03 +0000

Your bug report

#19451: compare-windows faces

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
19451: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19451
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#19451: compare-windows faces
From: Juri Linkov <[email-masked]>
To: Stefan Monnier <[email-masked]>
Cc: [email-masked]
Date: Sun, 28 Dec 2014 02:48:16 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

>> Since compare-windows is closely related to diff-mode and ediff
>> it would make sense to use diff faces in compare-windows:
>
> Sounds good.  But don't you need a (require 'diff-mode) to make sure
> those faces are actually defined?

A require is definitely required, so I installed with it.

Subject: compare-windows faces
From: Juri Linkov <[email-masked]>
To: [email-masked]
Date: Sat, 27 Dec 2014 03:14:35 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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))