aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/simple.el19
2 files changed, 15 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b1afb033404..55e6dfb0f50 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12012-03-11 Chong Yidong <cyd@gnu.org> 12012-03-11 Chong Yidong <cyd@gnu.org>
2 2
3 * simple.el (goto-line): Doc fix (Bug#9938).
4
3 * subr.el (save-window-excursion): Doc fix (Bug#9979). 5 * subr.el (save-window-excursion): Doc fix (Bug#9979).
4 6
5 * dabbrev.el (dabbrev--find-expansion): Update progress reporter 7 * dabbrev.el (dabbrev--find-expansion): Update progress reporter
diff --git a/lisp/simple.el b/lisp/simple.el
index 45daf99f614..f42ea3e7a50 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -893,16 +893,23 @@ that uses or sets the mark."
893;; Counting lines, one way or another. 893;; Counting lines, one way or another.
894 894
895(defun goto-line (line &optional buffer) 895(defun goto-line (line &optional buffer)
896 "Goto LINE, counting from line 1 at beginning of buffer. 896 "Go to LINE, counting from line 1 at beginning of buffer.
897Normally, move point in the current buffer, and leave mark at the 897If called interactively, a numeric prefix argument specifies
898previous position. With just \\[universal-argument] as argument, 898LINE; without a numeric prefix argument, read LINE from the
899move point in the most recently selected other buffer, and switch to it. 899minibuffer.
900
901If optional argument BUFFER is non-nil, switch to that buffer and
902move to line LINE there. If called interactively with \\[universal-argument]
903as argument, BUFFER is the most recently selected other buffer.
900 904
901If there's a number in the buffer at point, it is the default for LINE. 905Prior to moving point, this function sets the mark (without
906activating it), unless Transient Mark mode is enabled and the
907mark is already active.
902 908
903This function is usually the wrong thing to use in a Lisp program. 909This function is usually the wrong thing to use in a Lisp program.
904What you probably want instead is something like: 910What you probably want instead is something like:
905 (goto-char (point-min)) (forward-line (1- N)) 911 (goto-char (point-min))
912 (forward-line (1- N))
906If at all possible, an even better solution is to use char counts 913If at all possible, an even better solution is to use char counts
907rather than line counts." 914rather than line counts."
908 (interactive 915 (interactive