[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):

   (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))
        (bg (face-attribute 'mode-line :background)))
     "  "
     '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).

Attachment: in-vc.png
Description: PNG image

Attachment: modified-vc.png
Description: PNG image

reply via email to

[Prev in Thread] Current Thread [Next in Thread]