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: Sun, 04 Dec 2011 18:06:16 +0100
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

>> If you change (nth 5 ppss) you would still have to say that (nth 4 ppss)
>> is unreliable in this special case.
>
> Not if (nth 5 ppss) says that the buffer position is the one *after* the
> "/*" sequence.  Of course for "*/" we'd conversely want to use the state
> *before* "*/".

What I meant was that the caller would have to care about (nth 5 ppss)
too, wherever she now looked only at (nth 3 ppss) and (nth 4 ppss).  If
we say that a comment is everything in between and including both
delimiters she won't have to care about (nth 5 ppss) in the first place.

Admittedly, it's not entirely trivial to implement.  But the fact that
between "/" and "*" we are not in a comment whilst between "*" and "/"
we are doesn't strike me as very intuitive.

martin



reply via email to

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