|
33 | 33 | (put 'Compact-blame-progress-percentage-str 'risky-local-variable t)
|
34 | 34 | (defvar-local Compact-blame-max-author-length 0)
|
35 | 35 |
|
36 |
| -(defun Compact-blame-get-light-coeff () "TODO") |
37 |
| - |
38 | 36 | (defun Compact-blame-get-bg-color (id config)
|
39 |
| - (if (not (string-equal "rainbow" config)) |
40 |
| - config (Compact-blame-bg-color-from-id id))) |
| 37 | + (if (string-equal "rainbow2" config) |
| 38 | + (Compact-blame-bg-color-from-id (substring id 6 12)) |
| 39 | + (if (string-equal "rainbow" config) |
| 40 | + (Compact-blame-bg-color-from-id id) |
| 41 | + config))) |
41 | 42 |
|
42 | 43 | (defun Compact-blame-bg-color-from-id (id)
|
43 | 44 | (let* ((r (string-to-number (substring id 0 2) 16))
|
|
55 | 56 |
|
56 | 57 | (defmacro Compact-blame-defun-subst
|
57 | 58 | (name arglist docstring additional-lists form)
|
58 |
| - "Insert variable lists into function defs. That should allow us to |
59 |
| -pass object contexts around or store them to variables as a single unit" |
| 59 | + "Insert variable lists into function defs and/or arg lists. Equivalent C: |
| 60 | +
|
| 61 | +#define COMMIT_VARS time, author, id |
| 62 | +... |
| 63 | +
|
| 64 | +That should allow us to pass object contexts around or store them |
| 65 | +to variables as a single unit" |
60 | 66 | (let ((lex-env '((commit-vars time author id)
|
61 | 67 | (region-vars ov number length))))
|
62 | 68 | (setq lex-env (nconc (eval additional-lists lex-env) lex-env))
|
@@ -94,8 +100,7 @@ pass object contexts around or store them to variables as a single unit"
|
94 | 100 | `(let* ((str compact-blame-format)
|
95 | 101 | (id (overlay-get ov 'Compact-blame-rev))
|
96 | 102 | (b (Compact-blame-get-bg-color id compact-blame-bg1))
|
97 |
| - (b2 (Compact-blame-get-bg-color |
98 |
| - (substring id 6) compact-blame-bg2)) |
| 103 | + (b2 (Compact-blame-get-bg-color id compact-blame-bg2)) |
99 | 104 | (f (Compact-blame-fg-color-from-id id))
|
100 | 105 | (f2 (Compact-blame-fg-color-from-id id)))
|
101 | 106 | (setq length-indication
|
@@ -132,7 +137,7 @@ pass object contexts around or store them to variables as a single unit"
|
132 | 137 | :background b2 :foreground f2 :box '(:line-width -1)))) str))
|
133 | 138 | (setq str (replace-regexp-in-string "^\s+\\|\s+$" "" str))
|
134 | 139 | (setq str
|
135 |
| - (concat (propertize " \x25c4" 'face (list :foreground b)) str)) |
| 140 | + (concat (propertize " \x25c0" 'face (list :foreground b)) str)) |
136 | 141 | (overlay-put ov 'before-string str)))
|
137 | 142 |
|
138 | 143 | ;;(format "---\n\n%s" (symbol-function 'Compact-blame-update-overlay-local))
|
@@ -446,14 +451,16 @@ pass object contexts around or store them to variables as a single unit"
|
446 | 451 | ;; compact-blame-name-limit (- (float-time) take-off))
|
447 | 452 | )
|
448 | 453 |
|
| 454 | +(defun compact-blame-go-to-next-not-committed () (interactive) |
| 455 | + ) |
449 | 456 |
|
450 | 457 | (defconst Compact-blame-keymap (make-sparse-keymap))
|
451 | 458 | (define-key Compact-blame-keymap (kbd "RET") 'compact-blame-mode)
|
452 | 459 | (define-key Compact-blame-keymap "=" 'compact-blame-show-diff)
|
453 | 460 | (define-key Compact-blame-keymap "/" 'compact-blame-show-commit)
|
454 | 461 | (define-key Compact-blame-keymap "s" 'compact-blame-toggle-separators)
|
455 |
| -(define-key Compact-blame-keymap "-" 'compact-blame-light-up) |
456 |
| -(define-key Compact-blame-keymap "+" 'compact-blame-light-down) |
| 462 | +(define-key Compact-blame-keymap "9" 'compact-blame-light-up) |
| 463 | +(define-key Compact-blame-keymap "0" 'compact-blame-light-down) |
457 | 464 | (define-key Compact-blame-keymap "[" 'compact-blame-decrease-name-limit)
|
458 | 465 | (define-key Compact-blame-keymap "]" 'compact-blame-increase-name-limit)
|
459 | 466 |
|
|
0 commit comments