* Fixing bug #22983 (syntax-ppss is broken)
@ 2017-02-08 21:03 Alan Mackenzie
0 siblings, 0 replies; only message in thread
From: Alan Mackenzie @ 2017-02-08 21:03 UTC (permalink / raw)
To: emacs-devel
Hello, Emacs.
Just an idea to throw around.
syntax-ppss is broken. It tends to return false results when the buffer
is narrowed, and its invalidation routines are not comprehensive enough
- for example, invalidation doesn't happen when a new syntax table is
selected, or syntax-table text properties are applied to a buffer.
Examining the use made of syntax-ppss in Emacs, out of ~180 instances,
there are only a handful which deal with anything other than comments
and strings. Perhaps 10 - 20.
Stefan and Dmitry have objected to the comment-cache branch on the
grounds it "duplicates" the syntax-ppss cache. Well, how about
abandoning the problematic syntax-ppss and using the comment-cache cache
in its place? comment-cache features rock solid cache invalidation.
Also, comment-cache is faster than syntax-ppss (a lookup of a text
property compared with a linerar list search followed by a
parse-partial-sexp over up to 20,000 characters). So this strategy
would speed Emacs up somewhat.
That would just leave the aforementioned handful of cases to be hand
coded. Then we could deprecate syntax-ppss and remove it at a future
release.
:-)
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-08 21:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-08 21:03 Fixing bug #22983 (syntax-ppss is broken) Alan Mackenzie
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.