]> git.eshelyaron.com Git - emacs.git/commit
Don't mess up syntax-ppss cache in electric-pair (Bug#29710)
authorNoam Postavsky <npostavs@gmail.com>
Fri, 15 Dec 2017 02:25:13 +0000 (21:25 -0500)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 17 Dec 2017 02:02:38 +0000 (21:02 -0500)
commit89cfdbf729bc731331358e0efc69547547aa3ca2
treec70f4749d78bb754f604f100c361cb0668788793
parentc5061d81b972d9b846359d6b9be1c5a0fc4a2402
Don't mess up syntax-ppss cache in electric-pair (Bug#29710)

In Emacs 25 and above, calling `scan-sexps', `parse-partial-sexp', or
similar may update the syntax-ppss cache if
`parse-sexp-lookup-properties' is non-nil.  Therefore, when calling
any of these functions with a different than normal syntax-table, the
cache must be cleaned afterwards.
* lisp/elec-pair.el (electric-pair--with-uncached-syntax): New macro.
(electric-pair--syntax-ppss, electric-pair--balance-info): Use it.
lisp/elec-pair.el