I've tried doing this with an actual bug, namely bug #22983 "syntax-ppss
returns wrong result". That was over three months ago, and still there
is no fix.
Indeed, no fix. A few reasons:
- Lack of a concrete case which suffers from it (not much immediate benefit).
- In many cases, it's easier to fix the other side (the caller of syntax-ppss).
- It's hard to fix it right, not because of syntax-ppss in particular,
but because it's hard to make a generic facility which can be fast by
using a cache, yet is not being told where is the real intended
beginning of the buffer. In CC-mode you just decided to punt and
disallow the use of cc-mode where 1 is not the real beginning of the
C code. So your approach suffers from the same problem (just the
other side of it) and you haven't fixed it either.
This said, a quick&dirty fix (if such was needed, e.g. because of a concrete
case which exhibits the problem) would be to make syntax-ppss
always widen (and maybe add a syntax-ppss-dont-widen). Given that
there's no real hurry to fix it, I'd rather we fix it right.