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: Wed, 18 Jun 2014 11:57:14 +0300 [thread overview]
Message-ID: <8738f2ioid.fsf@mail.jurta.org> (raw)
In-Reply-To: <87ppi9cw9g.fsf@mail.jurta.org> (Juri Linkov's message of "Mon, 16 Jun 2014 09:55:31 +0300")
There is a related problem: currently vc-annotate uses dark background
even when the default background is light. Would be nicer to have
another option similar to the existing `vc-annotate-background', that
will define the default foreground (instead of the default background) and
to put colors from color-map on the background instead of the foreground:
=== modified file 'lisp/vc/vc-annotate.el'
--- lisp/vc/vc-annotate.el 2014-02-10 01:34:22 +0000
+++ lisp/vc/vc-annotate.el 2014-06-18 08:55:39 +0000
@@ -109,6 +109,14 @@ (defcustom vc-annotate-background "black
:type '(choice (const :tag "Default background" nil) (color))
:group 'vc)
+(defcustom vc-annotate-foreground "black"
+ "Foreground color for \\[vc-annotate].
+Default color is used if nil.
+It it applied only when `vc-annotate-background' is nil."
+ :type '(choice (const :tag "Default foreground" nil) (color))
+ :version "24.4"
+ :group 'vc)
+
(defcustom vc-annotate-menu-elements '(2 0.5 0.1 0.01)
"Menu elements for the mode-specific menu of VC-Annotate mode.
List of factors, used to expand/compress the time scale. See `vc-annotate'."
@@ -347,7 +355,9 @@ (defun vc-annotate (file rev &optional d
`vc-annotate-menu-elements' customizes the menu elements of the
mode-specific menu. `vc-annotate-color-map' and
`vc-annotate-very-old-color' define the mapping of time to colors.
-`vc-annotate-background' specifies the background color."
+`vc-annotate-background' specifies the background color.
+`vc-annotate-foreground' specifies the foreground color
+when `vc-annotate-background' is nil."
(interactive
(save-current-buffer
(vc-ensure-vc-buffer)
@@ -666,10 +676,15 @@ (defun vc-annotate-lines (limit)
;; Make the face if not done.
(face (or (intern-soft face-name)
(let ((tmp-face (make-face (intern face-name))))
- (set-face-foreground tmp-face (cdr color))
- (when vc-annotate-background
- (set-face-background tmp-face
- vc-annotate-background))
+ (cond
+ (vc-annotate-background
+ (set-face-foreground tmp-face (cdr color))
+ (set-face-background tmp-face vc-annotate-background))
+ (vc-annotate-foreground
+ (set-face-foreground tmp-face vc-annotate-foreground)
+ (set-face-background tmp-face (cdr color)))
+ (t
+ (set-face-foreground tmp-face (cdr color))))
tmp-face)))) ; Return the face
(put-text-property start end 'face face)))))
;; Pretend to font-lock there were no matches.
next prev parent reply other threads:[~2014-06-18 8:57 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
2014-06-18 8:57 ` Juri Linkov [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8738f2ioid.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 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.