]> git.eshelyaron.com Git - emacs.git/commitdiff
* vc-cvs.el (vc-cvs-annotate-extract-revision-at-line): New
authorAndré Spiegel <spiegel@gnu.org>
Tue, 20 Jan 2004 17:41:18 +0000 (17:41 +0000)
committerAndré Spiegel <spiegel@gnu.org>
Tue, 20 Jan 2004 17:41:18 +0000 (17:41 +0000)
function.

lisp/vc-cvs.el

index 048cb6ccfb4d01f9bb274282e38408ec953863bf..400a1ffb1057cb14dd140c1547c4262cdeff0000 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author:      FSF (see vc.el for full credits)
 ;; Maintainer:  Andre Spiegel <spiegel@gnu.org>
 
-;; $Id$
+;; $Id: vc-cvs.el,v 1.66 2003/10/01 13:22:53 fx Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -625,6 +625,14 @@ systime, or nil if there is none."
          (beginning-of-line nil)
            (vc-cvs-annotate-time))))))
 
+(defun vc-cvs-annotate-extract-revision-at-line ()
+  (save-excursion
+    (beginning-of-line)
+    (if (re-search-forward "^\\([0-9]+\\.[0-9]+\\(\\.[0-9]+\\)*\\) +("
+                          (line-end-position) t)
+       (match-string-no-properties 1)
+      nil)))
+
 ;;;
 ;;; Snapshot system
 ;;;