[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23019: parse-partial-sexp doesn't output the full state needed for i
bug#23019: parse-partial-sexp doesn't output the full state needed for its continuance.
Tue, 5 Apr 2016 14:44:53 +0000
On Tue, Apr 05, 2016 at 09:50:41AM -0400, Stefan Monnier wrote:
> > One concern I have is that there is code out there which compensates for
> > the previous inadequate behaviour (I know there is in CC Mode), and it
> > may be more difficult to switch off this compensation if there isn't an
> > easy way to distinguish new from old, such as (> (length state) 10).
> I'd be very surprised if other packages went to that trouble, but if
> needed you can still distinguish the new from the old with something like:
> (defconst pps-is-new
> (let ((st (make-syntax-table)))
> (modify-syntax-entry ?/ ". 14" st)
> (with-syntax-table st
> (insert "/")
> (nth 5 (parse-partial-sexp (point-min) (point-max)))))))
It can certainly be done, yes, but that way it can only really be done
at set up time, wherease (> (length state) 10) could be done more or
less at any time.
It was just a small point, really.
> -- Stefan
Alan Mackenzie (Nuremberg, Germany).