bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#5910: vc-hooks enhancement request: highlight checkouts


From: Albert Ting
Subject: bug#5910: vc-hooks enhancement request: highlight checkouts
Date: Thu, 8 Apr 2010 12:37:34 -0700

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


reply via email to

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