bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Andreas Röhler
Subject: bug#23443: 25.0.93; Temporary change to syntax-table is in effect during syntax-propertize
Date: Fri, 13 May 2016 07:49:16 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Icedove/38.7.0

reopen bugnumber

The proposed solution, which has to bind syntax-propertize-function to nil before calling scan-sexp, reads like a work around. These things shouldn't be necessary.
Assume a fix must affect usage of syntax-propertize-function and probably is not a trivial one.
Its design seems worth further discussion.

For example reading:

"The specified function may call ‘syntax-ppss’ on any position
before END, but it should not call ‘syntax-ppss-flush-cache’,
which means that it should not call ‘syntax-ppss’ on some
position and later modify the buffer on some earlier position."

Emacs can do better.

On 12.05.2016 12:05, Noam Postavsky wrote:
close 23443
tags 23443 + notabug
quit

On Sun, May 8, 2016 at 3:12 PM, Dmitry Gutov <address@hidden> wrote:
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).
Thanks, this seems to be working well (implemented in [1]).

[1]: https://github.com/capitaomorte/yasnippet/pull/695





reply via email to

[Prev in Thread] Current Thread [Next in Thread]