branch: elpa/rainbow-delimiters
commit 2f17e9d7354bb0285bbe5d6a784cabe32cfc2d6e
Author: Fanael Linithien <[email protected]>
Commit: Fanael Linithien <[email protected]>
Flush the ppss cache on mode activation.
This prevents the code from relying on stale cache if the mode
has been deactivated, the buffer changed and the mode activated again.
---
rainbow-delimiters.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/rainbow-delimiters.el b/rainbow-delimiters.el
index 6c4f47036b..2e45225386 100644
--- a/rainbow-delimiters.el
+++ b/rainbow-delimiters.el
@@ -569,6 +569,8 @@ Used by jit-lock for dynamic highlighting."
(remove-hook 'before-change-functions
'rainbow-delimiters-syntax-ppss-flush-cache t)
(jit-lock-unregister 'rainbow-delimiters-propertize-region)
(rainbow-delimiters-unpropertize-region (point-min) (point-max)))
+ ;; Flush the ppss cache now in case there's something left in there.
+ (setq rainbow-delimiters-parse-partial-sexp-cache nil)
(add-hook 'before-change-functions
'rainbow-delimiters-syntax-ppss-flush-cache t t)
(jit-lock-register 'rainbow-delimiters-propertize-region t)
;; Create necessary syntax tables inheriting from current major-mode.