branch: elpa/rainbow-delimiters
commit f43d48a24602be3ec899345a3326ed0247b960c6
Author: Fanael Linithien <[email protected]>
Commit: Fanael Linithien <[email protected]>
Widen before propertizing if under mmm-mode
Closes #52.
---
rainbow-delimiters.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/rainbow-delimiters.el b/rainbow-delimiters.el
index 6535e0df36..96691b80f8 100644
--- a/rainbow-delimiters.el
+++ b/rainbow-delimiters.el
@@ -231,6 +231,10 @@ Returns t if char at loc meets one of the following
conditions:
"Highlight delimiters in region between point and END.
Used by font-lock for dynamic highlighting."
+ (when (bound-and-true-p mmm-current-submode)
+ ;; `mmm-mode' is weird and apparently needs this hack, because otherwise we
+ ;; may end up thinking matched parentheses are mismatched.
+ (widen))
(let* ((last-ppss-pos (point))
(ppss (syntax-ppss)))
(while (> end (progn (skip-syntax-forward "^()" end)