aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorMiles Bader2004-11-04 08:55:40 +0000
committerMiles Bader2004-11-04 08:55:40 +0000
commitd1a3e560ff62e047d9fa8e8b3b1bc1e56e104c26 (patch)
tree935f61a936f33c7690a201b19b86e89c3d864b61 /src/syntax.c
parent32dc0e8f9bc2d460b3d964c21989de70282bab61 (diff)
parent0683d2414d4de8626f7c46f59937f9bef27302ce (diff)
downloademacs-d1a3e560ff62e047d9fa8e8b3b1bc1e56e104c26.tar.gz
emacs-d1a3e560ff62e047d9fa8e8b3b1bc1e56e104c26.zip
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-69
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-643 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-649 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-651 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-655 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-656 Update from CVS: lisp/man.el (Man-xref-normal-file): Fix help-echo. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-657 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-658 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-659 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-660 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-661 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-667 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-668 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-61 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-68 Update from CVS
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/syntax.c b/src/syntax.c
index d68628b181c..b062264ac24 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3023,12 +3023,23 @@ do { prev_from = from; \
3023 INC_FROM; 3023 INC_FROM;
3024 code = prev_from_syntax & 0xff; 3024 code = prev_from_syntax & 0xff;
3025 3025
3026 if (code == Scomment) 3026 if (from < end
3027 && SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax)
3028 && (c1 = FETCH_CHAR (from_byte),
3029 SYNTAX_COMSTART_SECOND (c1)))
3030 /* Duplicate code to avoid a complex if-expression
3031 which causes trouble for the SGI compiler. */
3027 { 3032 {
3028 state.comstyle = SYNTAX_FLAGS_COMMENT_STYLE (prev_from_syntax); 3033 /* Record the comment style we have entered so that only
3029 state.incomment = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax) ? 3034 the comment-end sequence of the same style actually
3030 1 : -1); 3035 terminates the comment section. */
3036 state.comstyle = SYNTAX_COMMENT_STYLE (c1);
3037 comnested = SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax);
3038 comnested = comnested || SYNTAX_COMMENT_NESTED (c1);
3039 state.incomment = comnested ? 1 : -1;
3031 state.comstr_start = prev_from; 3040 state.comstr_start = prev_from;
3041 INC_FROM;
3042 code = Scomment;
3032 } 3043 }
3033 else if (code == Scomment_fence) 3044 else if (code == Scomment_fence)
3034 { 3045 {
@@ -3040,24 +3051,13 @@ do { prev_from = from; \
3040 state.comstr_start = prev_from; 3051 state.comstr_start = prev_from;
3041 code = Scomment; 3052 code = Scomment;
3042 } 3053 }
3043 else if (from < end) 3054 else if (code == Scomment)
3044 if (SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax)) 3055 {
3045 if (c1 = FETCH_CHAR_AS_MULTIBYTE (from_byte), 3056 state.comstyle = SYNTAX_FLAGS_COMMENT_STYLE (prev_from_syntax);
3046 SYNTAX_COMSTART_SECOND (c1)) 3057 state.incomment = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax) ?
3047 /* Duplicate code to avoid a complex if-expression 3058 1 : -1);
3048 which causes trouble for the SGI compiler. */ 3059 state.comstr_start = prev_from;
3049 { 3060 }
3050 /* Record the comment style we have entered so that only
3051 the comment-end sequence of the same style actually
3052 terminates the comment section. */
3053 state.comstyle = SYNTAX_COMMENT_STYLE (c1);
3054 comnested = SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax);
3055 comnested = comnested || SYNTAX_COMMENT_NESTED (c1);
3056 state.incomment = comnested ? 1 : -1;
3057 state.comstr_start = prev_from;
3058 INC_FROM;
3059 code = Scomment;
3060 }
3061 3061
3062 if (SYNTAX_FLAGS_PREFIX (prev_from_syntax)) 3062 if (SYNTAX_FLAGS_PREFIX (prev_from_syntax))
3063 continue; 3063 continue;