Handle syntactic WS cache properties more accurately at buffer changes.
commit6463b85aeb67326acda340fbaad3e481e62120c0
authorAlan Mackenzie <acm@muc.de>
Wed, 11 Jan 2017 18:25:39 +0000 (11 18:25 +0000)
committerAlan Mackenzie <acm@muc.de>
Wed, 11 Jan 2017 18:25:39 +0000 (11 18:25 +0000)
tree888ef48e1defcf0c83acc651fc6db95bb3ea22f8
parent3a6df2d6043d32dd9a1864c87de8d99e9739a7e4
Handle syntactic WS cache properties more accurately at buffer changes.

This fixes bug #25362.

* lisp/progmodes/cc-engine.el (c-sws-lit-type, c-sws-lit-limits)
(c-invalidate-sws-region-before, c-invalidate-sws-region-after-del)
(c-invalidate-sws-region-after-ins): New variables and functions.
(c-invalidate-sws-region-after): Change from a defsubst to a defun.
Also pass
it the standard OLD-LEN argument.  Call both
c-invalidate-sws-region-after-{ins,del} to check for "dangerous" WS
cache
properties.

* lisp/progmodes/cc-langs.el (c-block-comment-ender-regexp): New language
variable.

* lisp/progmodes/cc-mode.el (c-before-change): Call
c-invalidate-sws-region-before.
(c-after-change): Pass old-len to c-invalidate-sws-region-after.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el
lisp/progmodes/cc-mode.el