[PATCH 1/3] git-blame.el: Do not use goto-line in lisp code
- From
Lawrence Mitchell <wence@gmx.li>
- Date
- Jun 10, 2012, 11:58 UTC
- Message-ID
- <1339329484-12088-1-git-send-email-wence@gmx.li>
- In-Reply-To
- <20120610073803.GA29461@burratino>
From: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
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> --- contrib/emacs/git-blame.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Here we go, all Rüdiger's changes look sensible, I've split them into bits though
diff --git a/contrib/emacs/git-blame.el b/contrib/emacs/git-blame.el index 37d797e..5428ff7 100644 --- a/contrib/emacs/git-blame.el +++ b/contrib/emacs/git-blame.el @@ -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))
-- 1.7.10.2.552.gaa3bb87