Mercurial > emacs
changeset 9475:c15caadae3c4
(scan_sexps_forward): At startincomment,
do notice a 2-char comment ender that straddles FROM.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 12 Oct 1994 08:24:47 +0000 |
parents | 9791aad17859 |
children | 59901c9aa208 |
files | src/syntax.c |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/syntax.c Wed Oct 12 08:16:29 1994 +0000 +++ b/src/syntax.c Wed Oct 12 08:24:47 1994 +0000 @@ -1511,9 +1511,20 @@ curlevel->prev = curlevel->last; break; + startincomment: + if (commentstop) + goto done; + if (from != BEGV) + { + /* Enter the loop in the middle so that we find + a 2-char comment ender if we start in the middle of it. */ + prev = FETCH_CHAR (from - 1); + goto startincomment_1; + } + /* At beginning of buffer, enter the loop the ordinary way. */ + case Scomment: state.incomment = 1; - startincomment: if (commentstop) goto done; while (1) @@ -1527,6 +1538,7 @@ encountered. */ break; from++; + startincomment_1: if (from < end && SYNTAX_COMEND_FIRST (prev) && SYNTAX_COMEND_SECOND (FETCH_CHAR (from)) && SYNTAX_COMMENT_STYLE (prev) == state.comstyle)