[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vc-mode-line
From: |
David House |
Subject: |
Re: vc-mode-line |
Date: |
Tue, 10 Aug 2010 11:29:25 -0400 |
On 5 August 2010 23:38, Óscar Fuentes <address@hidden> wrote:
> Whatever you decide, please consider allowing for some colorized
> clue. Associating background faces to VC states, for instance, so the
> user can customize "green for unmodified, red for modified" etc.
>
> I guess that asking for images would be too contentious ;-)
For a while now, I've been using the following customization to
display a green circle for an unmodified file and an orange square for
a modified one (versus the repository, I mean):
(setq-default
mode-line-format
'(...
(vc-mode (:eval (vc-icon)))
...)
;; Display a coloured square indicating the vc status of the current file
(defun vc-icon ()
(let ((icon (if (vc-workfile-unchanged-p (buffer-file-name))
"in-vc.png"
"modified-vc.png"))
(bg (face-attribute 'mode-line :background)))
(propertize
" "
'display (find-image
`((:type png :file ,icon :ascent center :background ,bg))))))
It relies on the attached two PNG images (I presume sending
attachments to this mailing list works; if not, email me and I'll
place them on imgur or somewhere similar).
in-vc.png
Description: PNG image
modified-vc.png
Description: PNG image
- Re: vc-mode-line, (continued)
- Re: vc-mode-line, Miles Bader, 2010/08/05
- Re: vc-mode-line, Óscar Fuentes, 2010/08/05
- Re: vc-mode-line, Óscar Fuentes, 2010/08/06
- Re: vc-mode-line, Miles Bader, 2010/08/06
- Re: vc-mode-line, Óscar Fuentes, 2010/08/06
- Re: vc-mode-line, Eli Zaretskii, 2010/08/06
- Re: vc-mode-line, Óscar Fuentes, 2010/08/06
- Re: vc-mode-line, Óscar Fuentes, 2010/08/06
- Re: vc-mode-line, Eli Zaretskii, 2010/08/06
- Re: vc-mode-line, Miles Bader, 2010/08/06
- Re: vc-mode-line,
David House <=
- Re: vc-mode-line, Óscar Fuentes, 2010/08/10
- Re: vc-mode-line, Ted Zlatanov, 2010/08/12