From: Lute Kamstra Date: Sat, 22 Nov 2008 17:33:06 +0000 (+0000) Subject: (goto-line): Rename argument. X-Git-Tag: emacs-pretest-23.0.90~1637 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9af967bd65ff0071d9a06313b7f274b87b591ce9;p=emacs.git (goto-line): Rename argument. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ae4300ae15c..9eb1ac93df2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-11-22 Lute Kamstra + + * simple.el (goto-line): Rename argument. + 2008-11-22 Eli Zaretskii * makefile.w32-in (compile-first): New target. diff --git a/lisp/simple.el b/lisp/simple.el index d8470cab4a3..ef06ace695a 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -837,15 +837,16 @@ that uses or sets the mark." ;; Counting lines, one way or another. -(defun goto-line (arg &optional buffer) - "Goto line ARG, counting from line 1 at beginning of buffer. -Normally, move point in the current buffer, and leave mark at previous -position. With just \\[universal-argument] as argument, move point -in the most recently displayed other buffer, and switch to it. -When called from Lisp code, the optional argument BUFFER specifies -a buffer to switch to. - -If there's a number in the buffer at point, it is the default for ARG." +(defun goto-line (line &optional buffer) + "Goto LINE, counting from line 1 at beginning of buffer. +Normally, move point in the current buffer, and leave mark at the +previous position. With just \\[universal-argument] as argument, +move point in the most recently selected other buffer, and switch +to it. When called from Lisp code, the optional argument BUFFER +specifies a buffer to switch to. + +If there's a number in the buffer at point, it is the default for +LINE." (interactive (if (and current-prefix-arg (not (consp current-prefix-arg))) (list (prefix-numeric-value current-prefix-arg)) @@ -887,8 +888,8 @@ If there's a number in the buffer at point, it is the default for ARG." (widen) (goto-char 1) (if (eq selective-display t) - (re-search-forward "[\n\C-m]" nil 'end (1- arg)) - (forward-line (1- arg))))) + (re-search-forward "[\n\C-m]" nil 'end (1- line)) + (forward-line (1- line))))) (defun count-lines-region (start end) "Print number of lines and characters in the region."