git-blame.el: Do not use goto-line in lisp code
authorRüdiger Sonderfeld <ruediger@c-plusplus.de>
Thu, 14 Jun 2012 09:37:58 +0000 (10:37 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Jun 2012 17:59:09 +0000 (10:59 -0700)
goto-line is a user-level command, instead use the lisp-level
construct recommended in Emacs documentation.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
Signed-off-by: Lawrence Mitchell <wence@gmx.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/emacs/git-blame.el

index d351cfb6e7e818f5f760e83889586c6dbf6e3a11..3b5d5afce58093110398aba9cfddd43fb8da1dcb 100644 (file)
@@ -389,7 +389,8 @@ See also function `git-blame-mode'."
     (set-buffer git-blame-file)
     (let ((inhibit-point-motion-hooks t)
           (inhibit-modification-hooks t))
-      (goto-line start-line)
+      (goto-char (point-min))
+      (forward-line (1- start-line))
       (let* ((start (point))
              (end (progn (forward-line num-lines) (point)))
              (ovl (make-overlay start end))