summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-05-25 18:49:54 +0000
committerRichard M. Stallman <rms@gnu.org>1993-05-25 18:49:54 +0000
commit10f20d5253d90458bdd4f4f91d1a99e9676637ce (patch)
tree412f3018265eea7dacaafebee1c3802bcf1214bc /src/syntax.c
parent2952b6a38636ec39157b960f1e26d853074cc603 (diff)
downloademacs-10f20d5253d90458bdd4f4f91d1a99e9676637ce.tar.gz
(Fforward_comment): Fix last change.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/syntax.c b/src/syntax.c
index fb584021485..2ade690b274 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -577,14 +577,17 @@ between them, return t; otherwise return nil.")
register int c;
register enum syntaxcode code;
int comstyle = 0; /* style of comment encountered */
+ int found;
immediate_quit = 1;
QUIT;
from = PT;
+ found = from;
while (count > 0)
{
+ found = from;
stop = ZV;
while (from < stop)
{
@@ -612,7 +615,7 @@ between them, return t; otherwise return nil.")
if (from == stop)
{
immediate_quit = 0;
- SET_PT (from);
+ SET_PT (found);
return Qnil;
}
c = FETCH_CHAR (from);
@@ -637,7 +640,7 @@ between them, return t; otherwise return nil.")
else if (code != Swhitespace)
{
immediate_quit = 0;
- SET_PT (from);
+ SET_PT (found);
return Qnil;
}
}
@@ -648,6 +651,8 @@ between them, return t; otherwise return nil.")
while (count < 0)
{
+ found = from;
+
stop = BEGV;
while (from > stop)
{
@@ -687,7 +692,7 @@ between them, return t; otherwise return nil.")
if (from == stop)
{
immediate_quit = 0;
- SET_PT (from);
+ SET_PT (found);
return Qnil;
}
from--;
@@ -811,7 +816,7 @@ between them, return t; otherwise return nil.")
else if (code != Swhitespace || quoted)
{
immediate_quit = 0;
- SET_PT (from);
+ SET_PT (found);
return Qnil;
}
}