aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1994-10-08 22:13:15 +0000
committerJim Blandy1994-10-08 22:13:15 +0000
commit4f5d0c3c26de7cb313983787aaf0c6989ed1f945 (patch)
tree19b05b86a685cbb8fc73a2dd759aa6b7052da1da /src
parent18e9375535db94d010d96d5f3b3dadf1c131f1be (diff)
downloademacs-4f5d0c3c26de7cb313983787aaf0c6989ed1f945.tar.gz
emacs-4f5d0c3c26de7cb313983787aaf0c6989ed1f945.zip
* 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')
-rw-r--r--src/cmds.c10
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\
106 } 106 }
107 107
108 negp = count <= 0; 108 negp = count <= 0;
109 pos = scan_buffer ('\n', pos2, count - negp, &shortage, 1); 109 pos = scan_buffer ('\n', pos2, 0, count - negp, &shortage, 1);
110 if (shortage > 0 110 if (shortage > 0
111 && (negp 111 && (negp
112 || (ZV > BEGV 112 || (ZV > BEGV
@@ -150,13 +150,7 @@ If scan reaches end of buffer, stop there without error.")
150 else 150 else
151 CHECK_NUMBER (n, 0); 151 CHECK_NUMBER (n, 0);
152 152
153 if (XINT (n) != 1) 153 SET_PT (find_before_next_newline (PT, 0, XINT (n) - (XINT (n) <= 0)));
154 Fforward_line (make_number (XINT (n) - 1));
155
156 pos = point;
157 stop = ZV;
158 while (pos < stop && FETCH_CHAR (pos) != '\n') pos++;
159 SET_PT (pos);
160 154
161 return Qnil; 155 return Qnil;
162} 156}