Subject: Re: bug#23443: 25.0.93; Temporary change to syntax-table is in effect during syntax-propertize

From: Dmitry Gutov <[email-masked]>
Date: Sun, 8 May 2016 22:12:05 +0300

On 05/08/2016 09:58 PM, Noam Postavsky wrote:

> That scan-sexps is being to parse the snippet syntax, which is why
> it's not using the major-mode's syntax table. I suppose the proper way
> to fix this is to parse the whole snippet before inserting it into the
> buffer,

It seems so.

> but I was hoping to put off the code reorganization that would
> entail for a while longer.

Here's a possible stopgap:

- Narrow the buffer to the snippet (just to be safe).
- Bind syntax-propertize-function to nil.
- Call scan-sexps.
- Call (syntax-ppss-flush-cache snippet-beginning-position).