From: Jonathan Nieder Date: Thu, 14 Jun 2012 05:08:54 GMT Subject: Re: [PATCH 1/3] git-blame.el: Do not use goto-line in lisp code Message-ID: <20120614050854.GG27586@burratino> In-Reply-To: <1339329484-12088-1-git-send-email-wence@gmx.li> Hi Lawrence, Lawrence Mitchell wrote: > From: RĂ¼diger Sonderfeld > > goto-line is a user-level command, instead use the lisp-level > construct recommended in Emacs documentation. [...] > Here we go, all RĂ¼diger's changes look sensible, I've split them into bits though Thanks for looking them over. Would you mind indulging my curiosity a little by describing what bad behavior or potential bad behavior this change prevents? Even without that information, I'm all for applying this patch, since it seems to be what all the people who know elisp recommend. :) Regards, Jonathan (patch kept unsnipped for convenience) > 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))