aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1997-12-21 01:57:32 +0000
committerRichard M. Stallman1997-12-21 01:57:32 +0000
commitbff37d2a0c94e0ad02948c6022715a7e6c8487eb (patch)
tree5a2713fbd2dfe8dc4a82fee0b422f2255e28fb42 /src
parentb179b621081f4d6ad768cf9e6d555ff7434688f0 (diff)
downloademacs-bff37d2a0c94e0ad02948c6022715a7e6c8487eb.tar.gz
emacs-bff37d2a0c94e0ad02948c6022715a7e6c8487eb.zip
(Fparse_partial_sexp): Return nil for 9th element
whenever not inside a string or a comment.
Diffstat (limited to 'src')
-rw-r--r--src/syntax.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/syntax.c b/src/syntax.c
index d3d6f5b0ba5..d5b4d9407ff 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -2642,24 +2642,23 @@ Value is a list of nine elements describing final state of parsing:\n\
2642 2. character address of start of last complete sexp terminated.\n\ 2642 2. character address of start of last complete sexp terminated.\n\
2643 3. non-nil if inside a string.\n\ 2643 3. non-nil if inside a string.\n\
2644 (it is the character that will terminate the string,\n\ 2644 (it is the character that will terminate the string,\n\
2645 or t if the string should be terminated by an explicit\n\ 2645 or t if the string should be terminated by a generic string delimiter.)\n\
2646 `syntax-table' property.)\n\
2647 4. t if inside a comment.\n\ 2646 4. t if inside a comment.\n\
2648 5. t if following a quote character.\n\ 2647 5. t if following a quote character.\n\
2649 6. the minimum paren-depth encountered during this scan.\n\ 2648 6. the minimum paren-depth encountered during this scan.\n\
2650 7. t if in a comment of style `b'; `syntax-table' if given by an explicit\n\ 2649 7. t if in a comment of style b; `syntax-table' if the comment\n\
2651 `syntax-table' property.\n\ 2650 should be terminated by a generic comment delimiter.\n\
2652 8. character address of start of last comment or string; nil if none.\n\ 2651 8. character address of start of comment or string; nil if not in one.\n\
2653If third arg TARGETDEPTH is non-nil, parsing stops if the depth\n\ 2652If third arg TARGETDEPTH is non-nil, parsing stops if the depth\n\
2654in parentheses becomes equal to TARGETDEPTH.\n\ 2653in parentheses becomes equal to TARGETDEPTH.\n\
2655Fourth arg STOPBEFORE non-nil means stop when come to\n\ 2654Fourth arg STOPBEFORE non-nil means stop when come to\n\
2656 any character that starts a sexp.\n\ 2655 any character that starts a sexp.\n\
2657Fifth arg STATE is an eight-list like what this function returns.\n\ 2656Fifth arg STATE is a nine-element list like what this function returns.\n\
2658It is used to initialize the state of the parse. Its second and third 2657 It is used to initialize the state of the parse. Elements number 1, 2, 6\n\
2659elements are ignored. 2658 and 8 are ignored; you can leave off element 8 (the last) entirely.\n\
2660Sixth arg COMMENTSTOP non-nil means stop at the start of a comment. If\n\ 2659Sixth arg COMMENTSTOP non-nil means stop at the start of a comment.\n\
2661it is `syntax-table', stop after the start of a comment or a string, or\n\ 2660 If it is `syntax-table', stop after the start of a comment or a string,\n\
2662after end of a comment or a string.") 2661 or after end of a comment or a string.")
2663 (from, to, targetdepth, stopbefore, state, commentstop) 2662 (from, to, targetdepth, stopbefore, state, commentstop)
2664*/ 2663*/
2665 2664
@@ -2695,12 +2694,15 @@ DEFUN ("parse-partial-sexp", Fparse_partial_sexp, Sparse_partial_sexp, 2, 6, 0,
2695 ? Qt : make_number (state.instring)) : Qnil, 2694 ? Qt : make_number (state.instring)) : Qnil,
2696 Fcons (state.incomment ? Qt : Qnil, 2695 Fcons (state.incomment ? Qt : Qnil,
2697 Fcons (state.quoted ? Qt : Qnil, 2696 Fcons (state.quoted ? Qt : Qnil,
2698 Fcons (make_number (state.mindepth), 2697 Fcons (make_number (state.mindepth),
2699 Fcons (state.comstyle 2698 Fcons ((state.comstyle
2700 ? (state.comstyle == ST_COMMENT_STYLE 2699 ? (state.comstyle == ST_COMMENT_STYLE
2701 ? Qsyntax_table : Qt) : Qnil, 2700 ? Qsyntax_table : Qt) :
2702 Fcons (state.comstr_start != -1 ? make_number (state.comstr_start) : Qnil, 2701 Qnil),
2703 Qnil))))))))); 2702 Fcons ((state.incomment || state.instring
2703 ? make_number (state.comstr_start)
2704 : Qnil),
2705 Qnil)))))))));
2704} 2706}
2705 2707
2706init_syntax_once () 2708init_syntax_once ()