[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mysterious fontification/C++ context issue

From: Stefan Monnier
Subject: Re: Mysterious fontification/C++ context issue
Date: Thu, 07 Dec 2006 00:07:25 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

> (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).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]