> (nth 9 ppss) is "Internal data for continuing the parsing".  If we're
> going to be using that thing's car as "the least nested paren", why
> don't we give up the pretence of an "internal" variable and document it
> properly?  I know it's used in some other places too, but it seems to
> be being economical with our integrity to use it ourselves whilst
> telling everybody else "it's internal stuff".  Or has this been
> discussed already?

When I decided to use this info in `syntax-ppss' I faced this exact same
problem, and decided to just go ahead with it: it's a sufficiently internal
function that if parse-partial-sexp is ever changed, syntax-ppss can be
changed as well.

I agree that in the case of cc-mode the situation is different.  Maybe,
instead of documenting this behavior, syntax.el should provide a function
(syntax-toplevel-pos PPSS) which returns the nearest previous position
that's outside of anything (string, comment, parenthesis).


        Stefan


_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to