aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorKaroly Lorentey2004-10-31 02:05:24 +0000
committerKaroly Lorentey2004-10-31 02:05:24 +0000
commite0bc17abe6979d607e8de4684dddb96e53c60065 (patch)
treeb7cb7bc5df9f12138937fd958cdf4b9c2d19ee3a /src/syntax.c
parentf158167a84475d5fc41931531406821e6413afd7 (diff)
parent707994d2626cf0f01c3ece4028d73835068d64dc (diff)
downloademacs-e0bc17abe6979d607e8de4684dddb96e53c60065.tar.gz
emacs-e0bc17abe6979d607e8de4684dddb96e53c60065.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-639 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-640 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-641 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-642 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-643 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-644 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-645 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-646 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-647 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-648 Update from CVS * 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 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-652 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-59 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-60 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-61 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-62 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-63 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-263
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 272e9cf1b12..8bfa62b49fc 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -2799,12 +2799,23 @@ do { prev_from = from; \
2799 INC_FROM; 2799 INC_FROM;
2800 code = prev_from_syntax & 0xff; 2800 code = prev_from_syntax & 0xff;
2801 2801
2802 if (code == Scomment) 2802 if (from < end
2803 && SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax)
2804 && (c1 = FETCH_CHAR (from_byte),
2805 SYNTAX_COMSTART_SECOND (c1)))
2806 /* Duplicate code to avoid a complex if-expression
2807 which causes trouble for the SGI compiler. */
2803 { 2808 {
2804 state.comstyle = SYNTAX_FLAGS_COMMENT_STYLE (prev_from_syntax); 2809 /* Record the comment style we have entered so that only
2805 state.incomment = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax) ? 2810 the comment-end sequence of the same style actually
2806 1 : -1); 2811 terminates the comment section. */
2812 state.comstyle = SYNTAX_COMMENT_STYLE (c1);
2813 comnested = SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax);
2814 comnested = comnested || SYNTAX_COMMENT_NESTED (c1);
2815 state.incomment = comnested ? 1 : -1;
2807 state.comstr_start = prev_from; 2816 state.comstr_start = prev_from;
2817 INC_FROM;
2818 code = Scomment;
2808 } 2819 }
2809 else if (code == Scomment_fence) 2820 else if (code == Scomment_fence)
2810 { 2821 {
@@ -2816,24 +2827,13 @@ do { prev_from = from; \
2816 state.comstr_start = prev_from; 2827 state.comstr_start = prev_from;
2817 code = Scomment; 2828 code = Scomment;
2818 } 2829 }
2819 else if (from < end) 2830 else if (code == Scomment)
2820 if (SYNTAX_FLAGS_COMSTART_FIRST (prev_from_syntax)) 2831 {
2821 if (c1 = FETCH_CHAR (from_byte), 2832 state.comstyle = SYNTAX_FLAGS_COMMENT_STYLE (prev_from_syntax);
2822 SYNTAX_COMSTART_SECOND (c1)) 2833 state.incomment = (SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax) ?
2823 /* Duplicate code to avoid a complex if-expression 2834 1 : -1);
2824 which causes trouble for the SGI compiler. */ 2835 state.comstr_start = prev_from;
2825 { 2836 }
2826 /* Record the comment style we have entered so that only
2827 the comment-end sequence of the same style actually
2828 terminates the comment section. */
2829 state.comstyle = SYNTAX_COMMENT_STYLE (c1);
2830 comnested = SYNTAX_FLAGS_COMMENT_NESTED (prev_from_syntax);
2831 comnested = comnested || SYNTAX_COMMENT_NESTED (c1);
2832 state.incomment = comnested ? 1 : -1;
2833 state.comstr_start = prev_from;
2834 INC_FROM;
2835 code = Scomment;
2836 }
2837 2837
2838 if (SYNTAX_FLAGS_PREFIX (prev_from_syntax)) 2838 if (SYNTAX_FLAGS_PREFIX (prev_from_syntax))
2839 continue; 2839 continue;