From: "David Kågedal" <davidk@lysator•liu.se>
To: git@vger•kernel.org
Subject: [PATCH 4/7] git-blame.el: improve color handling
Date: Fri, 09 Feb 2007 09:21:03 +0100 [thread overview]
Message-ID: <87r6szpwr4.fsf@morpheus.local> (raw)
Signed-off-by: David Kågedal <davidk@lysator•liu.se>
---
contrib/emacs/git-blame.el | 24 ++++++++++--------------
1 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/contrib/emacs/git-blame.el b/contrib/emacs/git-blame.el
index c99437e..7ffc153 100644
--- a/contrib/emacs/git-blame.el
+++ b/contrib/emacs/git-blame.el
@@ -95,16 +95,10 @@
colors))
(defvar git-blame-dark-colors
- (color-scale '("00" "04" "08" "0c"
- "10" "14" "18" "1c"
- "20" "24" "28" "2c"
- "30" "34" "38" "3c")))
+ (color-scale '("0c" "04" "24" "1c" "2c" "34" "14" "3c")))
(defvar git-blame-light-colors
- (color-scale '("c0" "c4" "c8" "cc"
- "d0" "d4" "d8" "dc"
- "e0" "e4" "e8" "ec"
- "f0" "f4" "f8" "fc")))
+ (color-scale '("c4" "d4" "cc" "dc" "f4" "e4" "fc" "ec")))
(defvar git-blame-ancient-color "dark green")
@@ -127,13 +121,15 @@
(make-local-variable 'git-blame-overlays)
(make-local-variable 'git-blame-colors)
(make-local-variable 'git-blame-cache)
- (let ((bgmode (cdr (assoc 'background-mode (frame-parameters)))))
- (if (eq bgmode 'dark)
- (setq git-blame-colors git-blame-dark-colors)
- (setq git-blame-colors git-blame-light-colors)))
+ (git-blame-cleanup)
(if git-blame-mode
- (git-blame-run)
- (git-blame-cleanup)))
+ (progn
+ (let ((bgmode (cdr (assoc 'background-mode (frame-parameters)))))
+ (if (eq bgmode 'dark)
+ (setq git-blame-colors git-blame-dark-colors)
+ (setq git-blame-colors git-blame-light-colors)))
+ (setq git-blame-cache (make-hash-table :test 'equal))
+ (git-blame-run))))
(defun git-blame-run ()
(let* ((display-buf (current-buffer))
--
1.5.0.rc3.204.g93c76
--
David Kågedal
reply other threads:[~2007-02-09 8:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87r6szpwr4.fsf@morpheus.local \
--to=davidk@lysator$(echo .)liu.se \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox