emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vc-mode-line


From: Óscar Fuentes
Subject: Re: vc-mode-line
Date: Fri, 06 Aug 2010 08:52:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Miles Bader <address@hidden> writes:

> Óscar Fuentes <address@hidden> writes:
>> It's trivial to make a patch for adding a configurable face for each VC
>> state. The question is: should they default to the current face, so the
>> modeline looks the same way as it does now, or should I use some
>> imagination and choose some (possibly horrible) defaults?
>
> I think a face for each state is excessive and not actually so flexible
> (because it only allows the face to be customized).
>
> Better just have a user-customizable alist that supports propertized strings.

What I have in mind is to apply the face to all the VC text on the
modeline ("Git-branchname" or "SVN:1020") not just to the state char, as
I pretended at first. Dunno how/if customizable propertized strings fits
that scenario.

OTOH it would be convenient to concentrate the user-visible info
associated to a VC state into a single function or list, instead of
being hard-coded into vc-default-mode-line-string:

(defun vc-info-for-state (state)
   (cond ((eq state 'up-to-date)
          '("Up to date" ":" vc-up-to-date-state-face))
...

This way if a backend FOO defines vc-FOO-mode-line-string it can use
that function for keeping consistentency with the other backends.




reply via email to

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