diff options
| author | Miles Bader | 2001-10-19 06:19:07 +0000 |
|---|---|---|
| committer | Miles Bader | 2001-10-19 06:19:07 +0000 |
| commit | 8abc9869bbfe52bd187c54fcc0e9771e844fe176 (patch) | |
| tree | 09704eab927b5fc73ea139ecf2a5258a4fa0c96c /src/cmds.c | |
| parent | 5fce351a6de18f245061171bc4c66c949242d221 (diff) | |
| download | emacs-8abc9869bbfe52bd187c54fcc0e9771e844fe176.tar.gz emacs-8abc9869bbfe52bd187c54fcc0e9771e844fe176.zip | |
(Fbeginning_of_line, Fend_of_line): Clarify interaction with fields and
suggest using `forward-line' to avoid them.
Diffstat (limited to 'src/cmds.c')
| -rw-r--r-- | src/cmds.c | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/src/cmds.c b/src/cmds.c index f938cc133db..791b410eb5b 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Simple built-in editing commands. | 1 | /* Simple built-in editing commands. |
| 2 | Copyright (C) 1985, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 93, 94, 95, 96, 97, 1998, 2001 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -150,15 +150,19 @@ With positive N, a non-empty line at the end counts as one line\n\ | |||
| 150 | return make_number (count <= 0 ? - shortage : shortage); | 150 | return make_number (count <= 0 ? - shortage : shortage); |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | DEFUN ("beginning-of-line", Fbeginning_of_line, Sbeginning_of_line, | 153 | DEFUN ("beginning-of-line", Fbeginning_of_line, Sbeginning_of_line, 0, 1, "p", |
| 154 | 0, 1, "p", | 154 | doc: /* Move point to beginning of current line. |
| 155 | "Move point to beginning of current line.\n\ | 155 | With argument N not nil or 1, move forward N - 1 lines first. |
| 156 | With argument N not nil or 1, move forward N - 1 lines first.\n\ | 156 | If point reaches the beginning or end of buffer, it stops there. |
| 157 | If point reaches the beginning or end of buffer, it stops there.\n\ | 157 | |
| 158 | This command does not move point across a field boundary\n\ | 158 | This command does not move point across a field boundary unless doing so |
| 159 | unless it would move beyond there to a different line.\n\ | 159 | would move beyond there to a different line; If N is nil or 1, and point |
| 160 | If N is nil or 1, and point starts at a field boundary, point does not move.") | 160 | starts at a field boundary, point does not move. To ignore field |
| 161 | (n) | 161 | boundaries, either bind `inhibit-field-text-motion' to t, or use the |
| 162 | `forward-line' function instead. For instance, `(forward-line 0)' does | ||
| 163 | the same thing as `(beginning-of-line)', except that it ignores field | ||
| 164 | boundaries. */) | ||
| 165 | (n) | ||
| 162 | Lisp_Object n; | 166 | Lisp_Object n; |
| 163 | { | 167 | { |
| 164 | if (NILP (n)) | 168 | if (NILP (n)) |
| @@ -171,15 +175,16 @@ If N is nil or 1, and point starts at a field boundary, point does not move.") | |||
| 171 | return Qnil; | 175 | return Qnil; |
| 172 | } | 176 | } |
| 173 | 177 | ||
| 174 | DEFUN ("end-of-line", Fend_of_line, Send_of_line, | 178 | DEFUN ("end-of-line", Fend_of_line, Send_of_line, 0, 1, "p", |
| 175 | 0, 1, "p", | 179 | doc: /* Move point to end of current line. |
| 176 | "Move point to end of current line.\n\ | 180 | With argument N not nil or 1, move forward N - 1 lines first. |
| 177 | With argument N not nil or 1, move forward N - 1 lines first.\n\ | 181 | If point reaches the beginning or end of buffer, it stops there. |
| 178 | If point reaches the beginning or end of buffer, it stops there.\n\ | 182 | |
| 179 | This command does not move point across a field boundary\n\ | 183 | This command does not move point across a field boundary unless doing so |
| 180 | unless it would move beyond there to a different line.\n\ | 184 | would move beyond there to a different line; if N is nil or 1, and |
| 181 | If N is nil or 1, and point starts at a field boundary, point does not move.") | 185 | point starts at a field boundary, point does not move. To ignore field |
| 182 | (n) | 186 | boundaries bind `inhibit-field-text-motion' to t. */) |
| 187 | (n) | ||
| 183 | Lisp_Object n; | 188 | Lisp_Object n; |
| 184 | { | 189 | { |
| 185 | if (NILP (n)) | 190 | if (NILP (n)) |