aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
authorJuanma Barranquero2002-10-18 10:09:43 +0000
committerJuanma Barranquero2002-10-18 10:09:43 +0000
commit7d0393cf12f2e50ee50e1a1fd73a60e9ef1f56ac (patch)
tree2331486f0c145e370d029e273961af152c190c65 /src/syntax.c
parentd49e7392f87656dfddf7a529fc7d312898524130 (diff)
downloademacs-7d0393cf12f2e50ee50e1a1fd73a60e9ef1f56ac.tar.gz
emacs-7d0393cf12f2e50ee50e1a1fd73a60e9ef1f56ac.zip
Fix typo in comment.
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 0f2cda592aa..f7b45cd6acc 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -199,7 +199,7 @@ update_syntax_table (charpos, count, init, object)
199 199
200 if (invalidate) 200 if (invalidate)
201 invalidate = !EQ (tmp_table, gl_state.old_prop); /* Need to invalidate? */ 201 invalidate = !EQ (tmp_table, gl_state.old_prop); /* Need to invalidate? */
202 202
203 if (invalidate) /* Did not get to adjacent interval. */ 203 if (invalidate) /* Did not get to adjacent interval. */
204 { /* with the same table => */ 204 { /* with the same table => */
205 /* invalidate the old range. */ 205 /* invalidate the old range. */
@@ -222,13 +222,13 @@ update_syntax_table (charpos, count, init, object)
222 if (EQ (Fsyntax_table_p (tmp_table), Qt)) 222 if (EQ (Fsyntax_table_p (tmp_table), Qt))
223 { 223 {
224 gl_state.use_global = 0; 224 gl_state.use_global = 0;
225 } 225 }
226 else if (CONSP (tmp_table)) 226 else if (CONSP (tmp_table))
227 { 227 {
228 gl_state.use_global = 1; 228 gl_state.use_global = 1;
229 gl_state.global_code = tmp_table; 229 gl_state.global_code = tmp_table;
230 } 230 }
231 else 231 else
232 { 232 {
233 gl_state.use_global = 0; 233 gl_state.use_global = 0;
234 gl_state.current_syntax_table = current_buffer->syntax_table; 234 gl_state.current_syntax_table = current_buffer->syntax_table;
@@ -251,7 +251,7 @@ update_syntax_table (charpos, count, init, object)
251 } 251 }
252 return; 252 return;
253 } 253 }
254 else if (cnt == INTERVALS_AT_ONCE) 254 else if (cnt == INTERVALS_AT_ONCE)
255 { 255 {
256 if (count > 0) 256 if (count > 0)
257 { 257 {
@@ -428,7 +428,7 @@ prev_char_comend_first (pos, pos_byte)
428 * int pos, pos_byte; 428 * int pos, pos_byte;
429 * { 429 * {
430 * int c, val; 430 * int c, val;
431 * 431 *
432 * DEC_BOTH (pos, pos_byte); 432 * DEC_BOTH (pos, pos_byte);
433 * UPDATE_SYNTAX_TABLE_BACKWARD (pos); 433 * UPDATE_SYNTAX_TABLE_BACKWARD (pos);
434 * c = FETCH_CHAR (pos_byte); 434 * c = FETCH_CHAR (pos_byte);
@@ -468,7 +468,7 @@ back_comment (from, from_byte, stop, comnested, comstyle, charpos_ptr, bytepos_p
468 int string_style = -1; /* Presumed outside of any string. */ 468 int string_style = -1; /* Presumed outside of any string. */
469 int string_lossage = 0; 469 int string_lossage = 0;
470 /* Not a real lossage: indicates that we have passed a matching comment 470 /* Not a real lossage: indicates that we have passed a matching comment
471 starter plus an non-matching comment-ender, meaning that any matching 471 starter plus a non-matching comment-ender, meaning that any matching
472 comment-starter we might see later could be a false positive (hidden 472 comment-starter we might see later could be a false positive (hidden
473 inside another comment). 473 inside another comment).
474 Test case: { a (* b } c (* d *) */ 474 Test case: { a (* b } c (* d *) */
@@ -584,7 +584,7 @@ back_comment (from, from_byte, stop, comnested, comstyle, charpos_ptr, bytepos_p
584 There's no way to grok this scanning backwards. */ 584 There's no way to grok this scanning backwards. */
585 string_lossage = 1; 585 string_lossage = 1;
586 break; 586 break;
587 587
588 case Scomment: 588 case Scomment:
589 /* We've already checked that it is the relevant comstyle. */ 589 /* We've already checked that it is the relevant comstyle. */
590 if (string_style != -1 || comment_lossage || string_lossage) 590 if (string_style != -1 || comment_lossage || string_lossage)
@@ -705,7 +705,7 @@ back_comment (from, from_byte, stop, comnested, comstyle, charpos_ptr, bytepos_p
705 from_byte = CHAR_TO_BYTE (from); 705 from_byte = CHAR_TO_BYTE (from);
706 UPDATE_SYNTAX_TABLE_FORWARD (from - 1); 706 UPDATE_SYNTAX_TABLE_FORWARD (from - 1);
707 } 707 }
708 708
709 done: 709 done:
710 *charpos_ptr = from; 710 *charpos_ptr = from;
711 *bytepos_ptr = from_byte; 711 *bytepos_ptr = from_byte;
@@ -732,7 +732,7 @@ check_syntax_table (obj)
732 if (!(CHAR_TABLE_P (obj) 732 if (!(CHAR_TABLE_P (obj)
733 && EQ (XCHAR_TABLE (obj)->purpose, Qsyntax_table))) 733 && EQ (XCHAR_TABLE (obj)->purpose, Qsyntax_table)))
734 wrong_type_argument (Qsyntax_table_p, obj); 734 wrong_type_argument (Qsyntax_table_p, obj);
735} 735}
736 736
737DEFUN ("syntax-table", Fsyntax_table, Ssyntax_table, 0, 0, 0, 737DEFUN ("syntax-table", Fsyntax_table, Ssyntax_table, 0, 0, 0,
738 doc: /* Return the current syntax table. 738 doc: /* Return the current syntax table.
@@ -961,7 +961,7 @@ text property. */)
961 val |= 1 << 22; 961 val |= 1 << 22;
962 break; 962 break;
963 } 963 }
964 964
965 if (val < XVECTOR (Vsyntax_code_object)->size && NILP (match)) 965 if (val < XVECTOR (Vsyntax_code_object)->size && NILP (match))
966 return XVECTOR (Vsyntax_code_object)->contents[val]; 966 return XVECTOR (Vsyntax_code_object)->contents[val];
967 else 967 else
@@ -971,7 +971,7 @@ text property. */)
971 971
972/* I really don't know why this is interactive 972/* I really don't know why this is interactive
973 help-form should at least be made useful whilst reading the second arg. */ 973 help-form should at least be made useful whilst reading the second arg. */
974DEFUN ("modify-syntax-entry", Fmodify_syntax_entry, Smodify_syntax_entry, 2, 3, 974DEFUN ("modify-syntax-entry", Fmodify_syntax_entry, Smodify_syntax_entry, 2, 3,
975 "cSet syntax for character: \nsSet syntax for %s to: ", 975 "cSet syntax for character: \nsSet syntax for %s to: ",
976 doc: /* Set syntax for character CHAR according to string NEWENTRY. 976 doc: /* Set syntax for character CHAR according to string NEWENTRY.
977The syntax is changed only for table SYNTAX_TABLE, which defaults to 977The syntax is changed only for table SYNTAX_TABLE, which defaults to
@@ -1293,7 +1293,7 @@ and the function returns nil. Field boundaries are not noticed if
1293 /* Avoid jumping out of an input field. */ 1293 /* Avoid jumping out of an input field. */
1294 val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT), 1294 val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT),
1295 Qt, Qnil, Qnil)); 1295 Qt, Qnil, Qnil));
1296 1296
1297 SET_PT (val); 1297 SET_PT (val);
1298 return val == orig_val ? Qt : Qnil; 1298 return val == orig_val ? Qt : Qnil;
1299} 1299}
@@ -1729,7 +1729,7 @@ forw_comment (from, from_byte, stop, nesting, style, prev_syntax,
1729 nesting++; 1729 nesting++;
1730 INC_BOTH (from, from_byte); 1730 INC_BOTH (from, from_byte);
1731 UPDATE_SYNTAX_TABLE_FORWARD (from); 1731 UPDATE_SYNTAX_TABLE_FORWARD (from);
1732 1732
1733 forw_incomment: 1733 forw_incomment:
1734 if (from < stop && SYNTAX_FLAGS_COMEND_FIRST (syntax) 1734 if (from < stop && SYNTAX_FLAGS_COMEND_FIRST (syntax)
1735 && SYNTAX_FLAGS_COMMENT_STYLE (syntax) == style 1735 && SYNTAX_FLAGS_COMMENT_STYLE (syntax) == style
@@ -1826,7 +1826,7 @@ between them, return t; otherwise return nil. */)
1826 && (c1 = FETCH_CHAR (from_byte), 1826 && (c1 = FETCH_CHAR (from_byte),
1827 SYNTAX_COMSTART_SECOND (c1))) 1827 SYNTAX_COMSTART_SECOND (c1)))
1828 { 1828 {
1829 /* We have encountered a comment start sequence and we 1829 /* We have encountered a comment start sequence and we
1830 are ignoring all text inside comments. We must record 1830 are ignoring all text inside comments. We must record
1831 the comment style this sequence begins so that later, 1831 the comment style this sequence begins so that later,
1832 only a comment end of the same style actually ends 1832 only a comment end of the same style actually ends
@@ -1907,7 +1907,7 @@ between them, return t; otherwise return nil. */)
1907 { 1907 {
1908 /* Skip until first preceding unquoted comment_fence. */ 1908 /* Skip until first preceding unquoted comment_fence. */
1909 int found = 0, ini = from, ini_byte = from_byte; 1909 int found = 0, ini = from, ini_byte = from_byte;
1910 1910
1911 while (1) 1911 while (1)
1912 { 1912 {
1913 DEC_BOTH (from, from_byte); 1913 DEC_BOTH (from, from_byte);
@@ -1916,9 +1916,9 @@ between them, return t; otherwise return nil. */)
1916 UPDATE_SYNTAX_TABLE_BACKWARD (from); 1916 UPDATE_SYNTAX_TABLE_BACKWARD (from);
1917 c = FETCH_CHAR (from_byte); 1917 c = FETCH_CHAR (from_byte);
1918 if (SYNTAX (c) == Scomment_fence 1918 if (SYNTAX (c) == Scomment_fence
1919 && !char_quoted (from, from_byte)) 1919 && !char_quoted (from, from_byte))
1920 { 1920 {
1921 found = 1; 1921 found = 1;
1922 break; 1922 break;
1923 } 1923 }
1924 } 1924 }
@@ -2036,7 +2036,7 @@ scan_lists (from, count, depth, sexpflag)
2036 && SYNTAX_COMSTART_SECOND (FETCH_CHAR (from_byte)) 2036 && SYNTAX_COMSTART_SECOND (FETCH_CHAR (from_byte))
2037 && parse_sexp_ignore_comments) 2037 && parse_sexp_ignore_comments)
2038 { 2038 {
2039 /* we have encountered a comment start sequence and we 2039 /* we have encountered a comment start sequence and we
2040 are ignoring all text inside comments. We must record 2040 are ignoring all text inside comments. We must record
2041 the comment style this sequence begins so that later, 2041 the comment style this sequence begins so that later,
2042 only a comment end of the same style actually ends 2042 only a comment end of the same style actually ends
@@ -2048,7 +2048,7 @@ scan_lists (from, count, depth, sexpflag)
2048 INC_BOTH (from, from_byte); 2048 INC_BOTH (from, from_byte);
2049 UPDATE_SYNTAX_TABLE_FORWARD (from); 2049 UPDATE_SYNTAX_TABLE_FORWARD (from);
2050 } 2050 }
2051 2051
2052 if (prefix) 2052 if (prefix)
2053 continue; 2053 continue;
2054 2054
@@ -2209,7 +2209,7 @@ scan_lists (from, count, depth, sexpflag)
2209 comstyle = SYNTAX_COMMENT_STYLE (c1); 2209 comstyle = SYNTAX_COMMENT_STYLE (c1);
2210 comnested = comnested || SYNTAX_COMMENT_NESTED (c1); 2210 comnested = comnested || SYNTAX_COMMENT_NESTED (c1);
2211 } 2211 }
2212 2212
2213 /* Quoting turns anything except a comment-ender 2213 /* Quoting turns anything except a comment-ender
2214 into a word character. Note that this cannot be true 2214 into a word character. Note that this cannot be true
2215 if we decremented FROM in the if-statement above. */ 2215 if we decremented FROM in the if-statement above. */
@@ -2310,14 +2310,14 @@ scan_lists (from, count, depth, sexpflag)
2310 DEC_BOTH (from, from_byte); 2310 DEC_BOTH (from, from_byte);
2311 if (from == stop) goto lose; 2311 if (from == stop) goto lose;
2312 UPDATE_SYNTAX_TABLE_BACKWARD (from); 2312 UPDATE_SYNTAX_TABLE_BACKWARD (from);
2313 if (!char_quoted (from, from_byte) 2313 if (!char_quoted (from, from_byte)
2314 && (c = FETCH_CHAR (from_byte), 2314 && (c = FETCH_CHAR (from_byte),
2315 SYNTAX_WITH_MULTIBYTE_CHECK (c) == code)) 2315 SYNTAX_WITH_MULTIBYTE_CHECK (c) == code))
2316 break; 2316 break;
2317 } 2317 }
2318 if (code == Sstring_fence && !depth && sexpflag) goto done2; 2318 if (code == Sstring_fence && !depth && sexpflag) goto done2;
2319 break; 2319 break;
2320 2320
2321 case Sstring: 2321 case Sstring:
2322 stringterm = FETCH_CHAR (from_byte); 2322 stringterm = FETCH_CHAR (from_byte);
2323 while (1) 2323 while (1)
@@ -2425,7 +2425,7 @@ This includes chars with "quote" or "prefix" syntax (' or p). */)
2425 int pos_byte = PT_BYTE; 2425 int pos_byte = PT_BYTE;
2426 int c; 2426 int c;
2427 2427
2428 if (pos <= beg) 2428 if (pos <= beg)
2429 { 2429 {
2430 SET_PT_BOTH (opoint, opoint_byte); 2430 SET_PT_BOTH (opoint, opoint_byte);
2431 2431
@@ -2533,8 +2533,8 @@ do { prev_from = from; \
2533 oldstate = Fcdr (oldstate); 2533 oldstate = Fcdr (oldstate);
2534 tem = Fcar (oldstate); 2534 tem = Fcar (oldstate);
2535 /* Check whether we are inside string_fence-style string: */ 2535 /* Check whether we are inside string_fence-style string: */
2536 state.instring = (!NILP (tem) 2536 state.instring = (!NILP (tem)
2537 ? (INTEGERP (tem) ? XINT (tem) : ST_STRING_STYLE) 2537 ? (INTEGERP (tem) ? XINT (tem) : ST_STRING_STYLE)
2538 : -1); 2538 : -1);
2539 2539
2540 oldstate = Fcdr (oldstate); 2540 oldstate = Fcdr (oldstate);
@@ -2552,7 +2552,7 @@ do { prev_from = from; \
2552 oldstate = Fcdr (oldstate); 2552 oldstate = Fcdr (oldstate);
2553 oldstate = Fcdr (oldstate); 2553 oldstate = Fcdr (oldstate);
2554 tem = Fcar (oldstate); 2554 tem = Fcar (oldstate);
2555 state.comstyle = NILP (tem) ? 0 : (EQ (tem, Qsyntax_table) 2555 state.comstyle = NILP (tem) ? 0 : (EQ (tem, Qsyntax_table)
2556 ? ST_COMMENT_STYLE : 1); 2556 ? ST_COMMENT_STYLE : 1);
2557 2557
2558 oldstate = Fcdr (oldstate); 2558 oldstate = Fcdr (oldstate);
@@ -2735,14 +2735,14 @@ do { prev_from = from; \
2735 state.comstr_start = from - 1; 2735 state.comstr_start = from - 1;
2736 if (stopbefore) goto stop; /* this arg means stop at sexp start */ 2736 if (stopbefore) goto stop; /* this arg means stop at sexp start */
2737 curlevel->last = prev_from; 2737 curlevel->last = prev_from;
2738 state.instring = (code == Sstring 2738 state.instring = (code == Sstring
2739 ? (FETCH_CHAR (prev_from_byte)) 2739 ? (FETCH_CHAR (prev_from_byte))
2740 : ST_STRING_STYLE); 2740 : ST_STRING_STYLE);
2741 if (boundary_stop) goto done; 2741 if (boundary_stop) goto done;
2742 startinstring: 2742 startinstring:
2743 { 2743 {
2744 nofence = state.instring != ST_STRING_STYLE; 2744 nofence = state.instring != ST_STRING_STYLE;
2745 2745
2746 while (1) 2746 while (1)
2747 { 2747 {
2748 int c; 2748 int c;
@@ -2824,7 +2824,7 @@ Value is a list of ten elements describing final state of parsing:
2824 3. non-nil if inside a string. 2824 3. non-nil if inside a string.
2825 (it is the character that will terminate the string, 2825 (it is the character that will terminate the string,
2826 or t if the string should be terminated by a generic string delimiter.) 2826 or t if the string should be terminated by a generic string delimiter.)
2827 4. nil if outside a comment, t if inside a non-nestable comment, 2827 4. nil if outside a comment, t if inside a non-nestable comment,
2828 else an integer (the current comment nesting). 2828 else an integer (the current comment nesting).
2829 5. t if following a quote character. 2829 5. t if following a quote character.
2830 6. the minimum paren-depth encountered during this scan. 2830 6. the minimum paren-depth encountered during this scan.
@@ -2860,23 +2860,23 @@ Sixth arg COMMENTSTOP non-nil means stop at the start of a comment.
2860 scan_sexps_forward (&state, XINT (from), CHAR_TO_BYTE (XINT (from)), 2860 scan_sexps_forward (&state, XINT (from), CHAR_TO_BYTE (XINT (from)),
2861 XINT (to), 2861 XINT (to),
2862 target, !NILP (stopbefore), oldstate, 2862 target, !NILP (stopbefore), oldstate,
2863 (NILP (commentstop) 2863 (NILP (commentstop)
2864 ? 0 : (EQ (commentstop, Qsyntax_table) ? -1 : 1))); 2864 ? 0 : (EQ (commentstop, Qsyntax_table) ? -1 : 1)));
2865 2865
2866 SET_PT (state.location); 2866 SET_PT (state.location);
2867 2867
2868 return Fcons (make_number (state.depth), 2868 return Fcons (make_number (state.depth),
2869 Fcons (state.prevlevelstart < 0 ? Qnil : make_number (state.prevlevelstart), 2869 Fcons (state.prevlevelstart < 0 ? Qnil : make_number (state.prevlevelstart),
2870 Fcons (state.thislevelstart < 0 ? Qnil : make_number (state.thislevelstart), 2870 Fcons (state.thislevelstart < 0 ? Qnil : make_number (state.thislevelstart),
2871 Fcons (state.instring >= 0 2871 Fcons (state.instring >= 0
2872 ? (state.instring == ST_STRING_STYLE 2872 ? (state.instring == ST_STRING_STYLE
2873 ? Qt : make_number (state.instring)) : Qnil, 2873 ? Qt : make_number (state.instring)) : Qnil,
2874 Fcons (state.incomment < 0 ? Qt : 2874 Fcons (state.incomment < 0 ? Qt :
2875 (state.incomment == 0 ? Qnil : 2875 (state.incomment == 0 ? Qnil :
2876 make_number (state.incomment)), 2876 make_number (state.incomment)),
2877 Fcons (state.quoted ? Qt : Qnil, 2877 Fcons (state.quoted ? Qt : Qnil,
2878 Fcons (make_number (state.mindepth), 2878 Fcons (make_number (state.mindepth),
2879 Fcons ((state.comstyle 2879 Fcons ((state.comstyle
2880 ? (state.comstyle == ST_COMMENT_STYLE 2880 ? (state.comstyle == ST_COMMENT_STYLE
2881 ? Qsyntax_table : Qt) : 2881 ? Qsyntax_table : Qt) :
2882 Qnil), 2882 Qnil),