Created
October 10, 2012 17:17
-
-
Save Idorobots/3867028 to your computer and use it in GitHub Desktop.
VC colors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar my-vc-alist '(;; Everything is ok: | |
(up-to-date some-green-face) | |
;; Kinda important: | |
(edited some-yellow-face) | |
(added some-yellow-face) | |
;; Most important: | |
;; ... | |
)) | |
(setq mode-line-format | |
(list ;; ... | |
'(:eval (let ((file-name (buffer-file-name))) | |
(if file-name | |
(let ((state-face (assoc (vc-state file-name) | |
my-vc-alist)) | |
(revision (vc-working-revision file-name))) | |
(propertize (concat "%b" | |
(when revision | |
(concat " [" revision "]"))) | |
'face (cadr state-face))) | |
"%b"))) | |
;; ... | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment