From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: vc-mode-line Date: Fri, 06 Aug 2010 08:52:53 +0200 Message-ID: <87ocdg5j22.fsf@telefonica.net> References: <83lj8tb2yg.fsf@gnu.org> <87mxt0ihtd.fsf@catnip.gol.com> <87wrs45s28.fsf@telefonica.net> <87sk2s5obj.fsf@telefonica.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1281077601 15768 80.91.229.12 (6 Aug 2010 06:53:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Aug 2010 06:53:21 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 06 08:53:18 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OhGnt-0000L1-Ft for ged-emacs-devel@m.gmane.org; Fri, 06 Aug 2010 08:53:17 +0200 Original-Received: from localhost ([127.0.0.1]:59755 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OhGnt-0007lb-0n for ged-emacs-devel@m.gmane.org; Fri, 06 Aug 2010 02:53:17 -0400 Original-Received: from [140.186.70.92] (port=60039 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OhGnj-0007lW-Sy for emacs-devel@gnu.org; Fri, 06 Aug 2010 02:53:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OhGni-0004Jt-Ha for emacs-devel@gnu.org; Fri, 06 Aug 2010 02:53:07 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:37129) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhGni-0004Jo-Aj for emacs-devel@gnu.org; Fri, 06 Aug 2010 02:53:06 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OhGnf-0000Dp-Pl for emacs-devel@gnu.org; Fri, 06 Aug 2010 08:53:03 +0200 Original-Received: from 83.42.13.171 ([83.42.13.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Aug 2010 08:53:03 +0200 Original-Received: from ofv by 83.42.13.171 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Aug 2010 08:53:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 83.42.13.171 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:oNGAYfeL8EoylqYLQGagCt/ehGU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:128363 Archived-At: Miles Bader writes: > Óscar Fuentes 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.