all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#19451: compare-windows faces
@ 2014-12-27  1:14 Juri Linkov
  2014-12-27 15:19 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2014-12-27  1:14 UTC (permalink / raw
  To: 19451

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







^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#19451: compare-windows faces
  2014-12-27  1:14 bug#19451: compare-windows faces Juri Linkov
@ 2014-12-27 15:19 ` Stefan Monnier
  2014-12-28  0:48   ` Juri Linkov
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2014-12-27 15:19 UTC (permalink / raw
  To: Juri Linkov; +Cc: 19451

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


        Stefan





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#19451: compare-windows faces
  2014-12-27 15:19 ` Stefan Monnier
@ 2014-12-28  0:48   ` Juri Linkov
  0 siblings, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2014-12-28  0:48 UTC (permalink / raw
  To: Stefan Monnier; +Cc: 19451-done

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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-28  0:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-27  1:14 bug#19451: compare-windows faces Juri Linkov
2014-12-27 15:19 ` Stefan Monnier
2014-12-28  0:48   ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.