diff options
| author | Chong Yidong | 2012-03-12 00:57:04 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-03-12 00:57:04 +0800 |
| commit | 397a688f21317fbbd59a820fc20cccbad8cf89fd (patch) | |
| tree | 431184bd915d996476589152ab58e92f9f42f6e6 | |
| parent | 66c5eebd416975af2bb1b2e0557dac967cc51f16 (diff) | |
| download | emacs-397a688f21317fbbd59a820fc20cccbad8cf89fd.tar.gz emacs-397a688f21317fbbd59a820fc20cccbad8cf89fd.zip | |
* simple.el (goto-line): Doc fix.
Fixes: debbugs:9938
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/simple.el | 19 |
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 @@ | |||
| 1 | 2012-03-11 Chong Yidong <cyd@gnu.org> | 1 | 2012-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. |
| 897 | Normally, move point in the current buffer, and leave mark at the | 897 | If called interactively, a numeric prefix argument specifies |
| 898 | previous position. With just \\[universal-argument] as argument, | 898 | LINE; without a numeric prefix argument, read LINE from the |
| 899 | move point in the most recently selected other buffer, and switch to it. | 899 | minibuffer. |
| 900 | |||
| 901 | If optional argument BUFFER is non-nil, switch to that buffer and | ||
| 902 | move to line LINE there. If called interactively with \\[universal-argument] | ||
| 903 | as argument, BUFFER is the most recently selected other buffer. | ||
| 900 | 904 | ||
| 901 | If there's a number in the buffer at point, it is the default for LINE. | 905 | Prior to moving point, this function sets the mark (without |
| 906 | activating it), unless Transient Mark mode is enabled and the | ||
| 907 | mark is already active. | ||
| 902 | 908 | ||
| 903 | This function is usually the wrong thing to use in a Lisp program. | 909 | This function is usually the wrong thing to use in a Lisp program. |
| 904 | What you probably want instead is something like: | 910 | What 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)) | ||
| 906 | If at all possible, an even better solution is to use char counts | 913 | If at all possible, an even better solution is to use char counts |
| 907 | rather than line counts." | 914 | rather than line counts." |
| 908 | (interactive | 915 | (interactive |