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: Andreas Röhler
Subject: Re: Musings: Supposed places of safety, guaranteed by parse-partial-sexp are not safe.
Date: Sun, 04 Dec 2011 21:47:53 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.24) Gecko/20111101 SUSE/3.1.16 Thunderbird/3.1.16

Am 04.12.2011 18:06, schrieb martin rudalics:
 >> 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



Hi,

a more striking example might deliver comments in html

<!-- base href="https://blub+index"; -->

thinks it's only the beginning which needs to be cared beside pps

worked around it with

- looking-at comment-start
- a check, if inside the begin-string, using string-match

Andreas





reply via email to

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