emacs-devel
[Top][All Lists]
Advanced

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

Re: Musings: Supposed places of safety, guaranteed by parse-partial-sexp


From: martin rudalics
Subject: Re: Musings: Supposed places of safety, guaranteed by parse-partial-sexp are not safe.
Date: Tue, 06 Dec 2011 11:15:22 +0100
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

> The parse-partial scanner works strictly left to right.  If (nth 5 ppss)
> records the left hand bit of "/*", we are not yet in a comment.  We're
> probably about to do a division.  Similarly, after * of "*/", we're still
> in the comment, probably just passed a comment prefix.

If we can look ahead by one character, there is no probability but
certainty.  And the latter is what you want in (nth 4 ppss).  The
remaining case is with an "/" at the end of a buffer and that case
wouldn't trouble me.

> I disagree.  I think keeping the stricly L to R invariant of the parse is
> critically important (but don't ask me why :-).

Why would looking ahead violate a L to R rule?

martin



reply via email to

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