From 6dfe5fe02d27ef3bee4e66fab056cfb02bba1247 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Spiegel?= Date: Sun, 8 Sep 1996 11:52:05 +0000 Subject: [PATCH] (vc-print-log): Move point to the log entry of the current version. --- lisp/vc.el | 9 +++++++++ 1 file changed, 9 insertions(+) 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) ) -- 2.39.2