GNU bug report logs - #5910
vc-hooks enhancement request: highlight checkouts

Previous Next

Package: emacs;

Reported by: Albert Ting <altlist <at> gmail.com>

Date: Thu, 8 Apr 2010 19:44:01 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Albert Ting <altlist <at> gmail.com>
To: 5910 <at> debbugs.gnu.org
Subject: bug#5910: vc-hooks enhancement request: highlight checkouts
Date: Thu, 8 Apr 2010 12:37:34 -0700
[Message part 1 (text/plain, inline)]
In GNU Emacs 21.3.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2003-04-21 on l-sftwr-2236
configured using `configure  --prefix=/home/vtools/apps/emacs-21.3'
Important settings:
  value of $LC_ALL: POSIX
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I posted this earlier but didn't see it get received.  So apologies if this
is a repeat.

In any case, I'd like to quest the vc auto-highlight any files that have
been modified/checkout in the vc-mode-line.  XEmacs supports this and below
is a patch to make it work in Emacs.

Thanks,
Albert

--- vc-hooks.el~    2010-04-08 12:33:24.016321000 -0700
+++ vc-hooks.el    2010-03-30 08:06:06.570204000 -0700
@@ -772,7 +772,10 @@
   (if (not backend)
       (setq vc-mode nil)
     (let* ((ml-string (vc-call-backend backend 'mode-line-string file))
-       (ml-echo (get-text-property 0 'help-echo ml-string)))
+       (ml-echo (get-text-property 0 'help-echo ml-string))
+       (test-str "^\\(RCS\\|CVS\\|SVN\\|SCCS\\|Arch\\|MCVS\\|GIT\\):")
+       (locked (string-match test-str ml-string))
+       )
       (setq vc-mode
         (concat
          " "
@@ -781,6 +784,7 @@
            (propertize
         ml-string
         'mouse-face 'mode-line-highlight
+        'face (if locked 'highlight 'mode-line)
         'help-echo
         (concat (or ml-echo
                 (format "File under the %s version control system"



Recent messages:
Loading completion...done
Loading advice...done
Loading cl-seq...done
done loading .emacs
For information about the GNU Project and its goals, type C-h C-p.
Loading cl-macs...done
Loading emacsbug...done
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.