[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/add-vdiff 10b7760 018/258: Add faces
From: |
Justin Burkett |
Subject: |
[elpa] scratch/add-vdiff 10b7760 018/258: Add faces |
Date: |
Wed, 17 May 2017 08:13:13 -0400 (EDT) |
branch: scratch/add-vdiff
commit 10b776077fb000b9e226a54be19d689fd783d0de
Author: justbur <address@hidden>
Commit: justbur <address@hidden>
Add faces
---
vdiff.el | 35 ++++++++++++++++++++++++++++++-----
1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/vdiff.el b/vdiff.el
index f959409..85bb07d 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -138,6 +138,31 @@ lines hidden."
:group 'vdiff
:type 'string)
+(defface vdiff-addition-face
+ '((t :background "#27321C"))
+ "Face for additions"
+ :group 'vdiff)
+
+(defface vdiff-change-face
+ '((t :background "#4C3A25"))
+ "Face for changes"
+ :group 'vdiff)
+
+(defface vdiff-closed-fold-face
+ '((t :inherit region))
+ "Face for closed folds"
+ :group 'vdiff)
+
+(defface vdiff-open-fold-face
+ '((t :background "#282828"))
+ "Face for open folds"
+ :group 'vdiff)
+
+(defface vdiff-subtraction-face
+ '((t :background "#3F1B1B"))
+ "Face for changes"
+ :group 'vdiff)
+
(defvar vdiff--buffers nil)
(defvar vdiff--temp-files nil)
(defvar vdiff--process-buffer " *vdiff*")
@@ -294,7 +319,7 @@ lines hidden."
(push (make-string (1- (vdiff--min-window-width)) ?-) string))
(propertize
(concat (mapconcat #'identity string "\n") "\n")
- 'face '(:background "#440000"))))
+ 'face 'vdiff-subtraction-face)))
(defun vdiff--add-subtraction-overlays (buffer start-line target-range amount)
(with-current-buffer buffer
@@ -317,8 +342,8 @@ lines hidden."
(point))))
(let ((ovr (make-overlay beg end)))
(overlay-put ovr 'face (if addition
- '(:background "#004422")
- '(:background "#353500")))
+ 'vdiff-addition-face
+ 'vdiff-change-face))
(overlay-put ovr 'vdiff--type (if addition
'addition
'change))
@@ -352,8 +377,8 @@ lines hidden."
(make-string (- (vdiff--min-window-width)
(length text) 1) ?-)
"\n")
- 'face 'region)))
- (overlay-put ovr 'face '(:background "#111"))
+ 'face 'vdiff-closed-fold-face)))
+ (overlay-put ovr 'face 'vdiff-open-fold-face)
(overlay-put ovr 'vdiff-fold-text text)
(overlay-put ovr 'vdiff-type 'fold)
ovr)))
- [elpa] scratch/add-vdiff b4c3e09 195/258: Ensure sentinel runs in correct context, (continued)
- [elpa] scratch/add-vdiff b4c3e09 195/258: Ensure sentinel runs in correct context, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 28c939f 194/258: Document new option, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 133e187 193/258: Allow folds to close on point but make optional, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 4dd194b 190/258: Update screenshot with refinements, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff b840935 202/258: Use more specific faces for refinements, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff f4332f2 212/258: Fix typo in Commentary section, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 1549115 005/258: Add option to lock scrolling by default, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 0f640d3 007/258: Add header info, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 72c20a5 010/258: Add gitignore, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 016518f 016/258: Fix folds at end of buffer, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 10b7760 018/258: Add faces,
Justin Burkett <=
- [elpa] scratch/add-vdiff 952440e 002/258: Initial commit, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 245850f 028/258: Load cl-lib for using its function, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 988c476 027/258: Add new defcustoms to README, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff b77efe3 008/258: Add README and improve docstrings, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff ce10994 003/258: Introduce defcustoms and use lists instead of .., Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff ad6035d 015/258: Implement folding of unchanged lines, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff af75c6d 036/258: Add vdiff-exit, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff e8834fa 035/258: Fix fold size calcs, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff 9547850 041/258: Use diff faces from theme, Justin Burkett, 2017/05/17
- [elpa] scratch/add-vdiff bac92b3 037/258: Improve line translation and command mirroring, Justin Burkett, 2017/05/17