summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Spiegel <spiegel@gnu.org>1996-09-08 11:52:05 +0000
committerAndré Spiegel <spiegel@gnu.org>1996-09-08 11:52:05 +0000
commitc1df58d3888127fc071fb7dbc72494004f8a029f (patch)
tree918e56236d93c7cc175d0f70952934185d17fc3f
parent80b76af00b0580dcbacf1e7083388c684a946f4a (diff)
downloademacs-c1df58d3888127fc071fb7dbc72494004f8a029f.tar.gz
(vc-print-log): Move point to the log entry of the current version.
-rw-r--r--lisp/vc.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index c1d946a3ac7..4fb84ab1356 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1572,6 +1572,15 @@ levels in the snapshot."
(if (looking-at "[\b\t\n\v\f\r ]+")
(delete-char (- (match-end 0) (match-beginning 0))))
(shrink-window-if-larger-than-buffer)
+ ;; move point to the log entry for the current version
+ (if (not (eq (vc-backend file) 'SCCS))
+ (let ((pos (re-search-forward
+ ;; also match some context, for safety
+ (concat "----\nrevision " (vc-workfile-version file)
+ "\\(\tlocked by:.*\n\\|\n\\)date: ") nil t)))
+ (if pos (progn (goto-char pos)
+ (beginning-of-line)
+ (forward-line -1)))))
)
(vc-registration-error buffer-file-name)
)