Commit b6b50160 authored by André Spiegel's avatar André Spiegel

(vc-current-line): Function removed. This is now done by the new

function line-at-pos in simple.el.
(vc-annotate-warp-version): Use line-at-pos instead of
vc-current-line.
parent f076870a
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;; Maintainer: Andre Spiegel <spiegel@gnu.org> ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
;; Keywords: tools ;; Keywords: tools
;; $Id: vc.el,v 1.362 2004/01/20 17:39:09 uid65624 Exp $ ;; $Id: vc.el,v 1.363 2004/01/21 11:05:51 uid65624 Exp $
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
...@@ -3135,19 +3135,6 @@ versions after." ...@@ -3135,19 +3135,6 @@ versions after."
(vc-version-diff vc-annotate-parent-file prev-rev rev-at-line)) (vc-version-diff vc-annotate-parent-file prev-rev rev-at-line))
(switch-to-buffer "*vc-diff*")))))) (switch-to-buffer "*vc-diff*"))))))
(defun vc-current-line ()
"Return the current buffer's line number."
(let ((oldpoint (point)) start)
(save-excursion
(save-restriction
(goto-char (point-min))
(widen)
(forward-line 0)
(setq start (point))
(goto-char oldpoint)
(forward-line 0)
(1+ (count-lines (point-min) (point)))))))
(defun vc-annotate-warp-version (revspec) (defun vc-annotate-warp-version (revspec)
"Annotate the version described by REVSPEC. "Annotate the version described by REVSPEC.
...@@ -3159,7 +3146,7 @@ string, then it describes a revision number, so warp to that ...@@ -3159,7 +3146,7 @@ string, then it describes a revision number, so warp to that
revision." revision."
(if (not (equal major-mode 'vc-annotate-mode)) (if (not (equal major-mode 'vc-annotate-mode))
(message "Cannot be invoked outside of a vc annotate buffer") (message "Cannot be invoked outside of a vc annotate buffer")
(let* ((oldline (vc-current-line)) (let* ((oldline (line-at-pos))
(revspeccopy revspec) (revspeccopy revspec)
(newrev nil)) (newrev nil))
(cond (cond
...@@ -3191,7 +3178,7 @@ revision." ...@@ -3191,7 +3178,7 @@ revision."
(switch-to-buffer (car (car (last vc-annotate-buffers)))) (switch-to-buffer (car (car (last vc-annotate-buffers))))
(goto-line (min oldline (progn (goto-char (point-max)) (goto-line (min oldline (progn (goto-char (point-max))
(previous-line) (previous-line)
(vc-current-line)))))))) (line-at-pos))))))))
(defun vc-annotate-car-last-cons (a-list) (defun vc-annotate-car-last-cons (a-list)
"Return car of last cons in association list A-LIST." "Return car of last cons in association list A-LIST."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment