From 508047dc4ebc4ffe3ae9e916d0d0539312ef741b Mon Sep 17 00:00:00 2001 From: Arvin Sevilla Date: Tue, 6 Sep 2022 21:22:22 +0800 Subject: [PATCH] fix: prevent error when closing parens or brackets https://github.com/purcell/mmm-mode/issues/112#issuecomment-751926650 --- mmm-region.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mmm-region.el b/mmm-region.el index 416ad35..5048611 100644 --- a/mmm-region.el +++ b/mmm-region.el @@ -883,7 +883,10 @@ calls each respective submode's `syntax-propertize-function'." (save-restriction (when mmm-current-overlay (narrow-to-region (overlay-start mmm-current-overlay) - (overlay-end mmm-current-overlay))) + (overlay-end mmm-current-overlay)) + (put-text-property + (point-min) (point-max) + 'syntax-table (syntax-table))) (cond (func (funcall func beg end))