branch: externals/matlab-mode
commit e3b338b3231a736b830a5ff2235f89b28ab05c1d
Author: John Ciolfi <[email protected]>
Commit: John Ciolfi <[email protected]>
matlab-ts-mode--ei: always cache disabled regions
---
matlab-ts-mode--ei.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/matlab-ts-mode--ei.el b/matlab-ts-mode--ei.el
index 5324ddb53b..2b7ee4ad9c 100644
--- a/matlab-ts-mode--ei.el
+++ b/matlab-ts-mode--ei.el
@@ -1748,7 +1748,8 @@ END-LINE1 corresponds to the first %-indent-mode=full
comment and so on."
(error "Assert: bad directive, %s" directive)))))
(when start-line
(push `(,start-line . ,(line-number-at-pos (point-max)))
result))))
- (reverse result))))
+ ;; Always return non-nil for caching and (-1 . 0) will never be used.
+ (or (reverse result) '((-1 . 0))))))
(defun matlab-ts-mode--ei-in-disabled-region (&optional linenum)
"Is LINENUM in a disabled region?