diff options
author | Jim Blandy <jimb@redhat.com> | 1994-10-08 22:13:15 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1994-10-08 22:13:15 +0000 |
commit | d1c89b9b162cbca1968bd9bc48b1e37ef522d679 (patch) | |
tree | 220a74c8237263943e0176a4032a19bd76d1eb13 /src/cmds.c | |
parent | e90b1a7dad6dd7834eee413b867102322d5b34a1 (diff) | |
download | emacs-d1c89b9b162cbca1968bd9bc48b1e37ef522d679.tar.gz |
* cmds.c (Fforward_line): Call scan_buffer with new args.
(Fend_of_line): Replace call to Fforward_line and search loop with
call to find_before_next_newline.
Diffstat (limited to 'src/cmds.c')
-rw-r--r-- | src/cmds.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/cmds.c b/src/cmds.c index 1e8ded46942..88f61234333 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -106,7 +106,7 @@ With positive ARG, a non-empty line at the end counts as one line\n\ } negp = count <= 0; - pos = scan_buffer ('\n', pos2, count - negp, &shortage, 1); + pos = scan_buffer ('\n', pos2, 0, count - negp, &shortage, 1); if (shortage > 0 && (negp || (ZV > BEGV @@ -150,13 +150,7 @@ If scan reaches end of buffer, stop there without error.") else CHECK_NUMBER (n, 0); - if (XINT (n) != 1) - Fforward_line (make_number (XINT (n) - 1)); - - pos = point; - stop = ZV; - while (pos < stop && FETCH_CHAR (pos) != '\n') pos++; - SET_PT (pos); + SET_PT (find_before_next_newline (PT, 0, XINT (n) - (XINT (n) <= 0))); return Qnil; } |