From: Juri Linkov <juri@jurta.org>
To: Dani Moncayo <dmoncayo@gmail.com>
Cc: 10181@debbugs.gnu.org
Subject: bug#10181: split `diff-refine-change' in several faces
Date: Mon, 16 Jun 2014 09:55:31 +0300 [thread overview]
Message-ID: <87ppi9cw9g.fsf@mail.jurta.org> (raw)
In-Reply-To: <87vbs3y6s3.fsf@mail.jurta.org> (Juri Linkov's message of "Sat, 14 Jun 2014 16:12:12 +0300")
> Also this means that we don't need to use `shadow' on context lines anymore,
> because the differing lines are always highlighted by default.
Actually better to use the same color for context lines as used
on most other VCSes - #333333 for light backgrounds (its symmetric
color for dark backgrounds would be #dddddd):
=== modified file 'lisp/vc/diff-mode.el'
--- lisp/vc/diff-mode.el 2014-01-01 07:43:34 +0000
+++ lisp/vc/diff-mode.el 2014-06-16 06:54:30 +0000
@@ -343,7 +337,10 @@ (define-obsolete-face-alias 'diff-functi
(defvar diff-function-face 'diff-function)
(defface diff-context
- '((((class color grayscale) (min-colors 88)) :inherit shadow))
+ '((((class color grayscale) (min-colors 88) (background light))
+ :foreground "#333333")
+ (((class color grayscale) (min-colors 88) (background dark))
+ :foreground "#dddddd"))
"`diff-mode' face used to highlight context and other side-information."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-context-face 'diff-context "22.1")
BTW, Ediff keeps font-lock highlighting while displaying the current hunk
that is good, but removes font-lock highlighting on non-current differences.
It would be much nicer to keep font-lock highlighting on these lines as well.
This patch does this by removing :foreground "White" and :foreground "Black"
from face definitions for min-colors 88, and keeps their :background colors:
=== modified file 'lisp/vc/ediff-init.el'
--- lisp/vc/ediff-init.el 2014-05-03 02:27:46 +0000
+++ lisp/vc/ediff-init.el 2014-06-16 06:54:34 +0000
@@ -949,7 +949,9 @@ (and (featurep 'xemacs)
(defface ediff-current-diff-Ancestor
(if (featurep 'emacs)
- '((((class color) (min-colors 16))
+ '((((class color) (min-colors 88))
+ (:background "VioletRed"))
+ (((class color) (min-colors 16))
(:foreground "Black" :background "VioletRed"))
(((class color))
(:foreground "black" :background "magenta3"))
@@ -1057,7 +1059,9 @@ (ediff-hide-face ediff-fine-diff-face-C)
(defface ediff-fine-diff-Ancestor
(if (featurep 'emacs)
- '((((class color) (min-colors 16))
+ '((((class color) (min-colors 88))
+ (:background "Green"))
+ (((class color) (min-colors 16))
(:foreground "Black" :background "Green"))
(((class color))
(:foreground "red3" :background "green"))
@@ -1091,6 +1095,8 @@ (defface ediff-even-diff-A
(if (featurep 'emacs)
`((((type pc))
(:foreground "green3" :background "light grey"))
+ (((class color) (min-colors 88))
+ (:background "light grey"))
(((class color) (min-colors 16))
(:foreground "Black" :background "light grey"))
(((class color))
@@ -1115,7 +1121,9 @@ (ediff-hide-face ediff-even-diff-face-A)
(defface ediff-even-diff-B
(if (featurep 'emacs)
- `((((class color) (min-colors 16))
+ `((((class color) (min-colors 88))
+ (:background "Grey"))
+ (((class color) (min-colors 16))
(:foreground "White" :background "Grey"))
(((class color))
(:foreground "blue3" :background "Grey" :weight bold))
@@ -1138,6 +1146,8 @@ (defface ediff-even-diff-C
(if (featurep 'emacs)
`((((type pc))
(:foreground "yellow3" :background "light grey"))
+ (((class color) (min-colors 88))
+ (:background "light grey"))
(((class color) (min-colors 16))
(:foreground "Black" :background "light grey"))
(((class color))
@@ -1164,6 +1174,8 @@ (defface ediff-even-diff-Ancestor
(if (featurep 'emacs)
`((((type pc))
(:foreground "cyan3" :background "light grey"))
+ (((class color) (min-colors 88))
+ (:background "Grey"))
(((class color) (min-colors 16))
(:foreground "White" :background "Grey"))
(((class color))
@@ -1197,6 +1209,8 @@ (defface ediff-odd-diff-A
(if (featurep 'emacs)
'((((type pc))
(:foreground "green3" :background "gray40"))
+ (((class color) (min-colors 88))
+ (:background "Grey"))
(((class color) (min-colors 16))
(:foreground "White" :background "Grey"))
(((class color))
@@ -1222,6 +1236,8 @@ (defface ediff-odd-diff-B
(if (featurep 'emacs)
'((((type pc))
(:foreground "White" :background "gray40"))
+ (((class color) (min-colors 88))
+ (:background "light grey"))
(((class color) (min-colors 16))
(:foreground "Black" :background "light grey"))
(((class color))
@@ -1246,6 +1262,8 @@ (defface ediff-odd-diff-C
(if (featurep 'emacs)
'((((type pc))
(:foreground "yellow3" :background "gray40"))
+ (((class color) (min-colors 88))
+ (:background "Grey"))
(((class color) (min-colors 16))
(:foreground "White" :background "Grey"))
(((class color))
@@ -1268,7 +1286,9 @@ (ediff-hide-face ediff-odd-diff-face-C)
(defface ediff-odd-diff-Ancestor
(if (featurep 'emacs)
- '((((class color) (min-colors 16))
+ '((((class color) (min-colors 88))
+ (:background "gray40"))
+ (((class color) (min-colors 16))
(:foreground "cyan3" :background "gray40"))
(((class color))
(:foreground "green3" :background "black" :weight bold))
next prev parent reply other threads:[~2014-06-16 6:55 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 15:56 bug#10181: 24.0.92; [wishlist] split `diff-refine-change' in several faces Dani Moncayo
2011-12-02 10:47 ` Juri Linkov
2012-05-17 0:33 ` Juri Linkov
2012-05-17 1:37 ` Stefan Monnier
2012-05-18 0:32 ` Juri Linkov
2012-05-18 18:12 ` Stefan Monnier
2012-05-18 23:07 ` Juri Linkov
2012-05-19 18:24 ` Stefan Monnier
2012-05-19 23:55 ` Juri Linkov
2012-05-20 15:06 ` Stefan Monnier
2012-05-21 0:28 ` Juri Linkov
2012-05-21 1:45 ` Stefan Monnier
2012-05-23 0:36 ` Juri Linkov
2012-05-23 13:53 ` Stefan Monnier
2012-05-25 0:57 ` Juri Linkov
2012-05-25 13:21 ` Stefan Monnier
2012-05-25 20:35 ` Juri Linkov
2012-05-26 13:13 ` Stefan Monnier
2012-05-27 9:46 ` Juri Linkov
[not found] ` <handler.10181.D10181.133811261729958.notifdone@debbugs.gnu.org>
2012-09-30 16:38 ` Juri Linkov
2014-06-14 11:58 ` bug#10181: " Dani Moncayo
2014-06-14 12:54 ` Juri Linkov
2014-06-14 13:12 ` Juri Linkov
2014-06-16 6:55 ` Juri Linkov [this message]
2014-06-18 8:57 ` Juri Linkov
2014-06-18 9:14 ` Dani Moncayo
2014-06-19 6:54 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ppi9cw9g.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=10181@debbugs.gnu.org \
--cc=dmoncayo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).