[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
From: |
Stefan Monnier |
Subject: |
bug#23019: parse-partial-sexp doesn't output the full state needed for its continuance. |
Date: |
Tue, 05 Apr 2016 09:50:41 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> 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-temp-buffer
(with-syntax-table st
(insert "/")
(nth 5 (parse-partial-sexp (point-min) (point-max)))))))
-- Stefan