[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 0da2ac9 358/433: * mmm-syntax-propertize-function: Don't p
From: |
Dmitry Gutov |
Subject: |
[elpa] master 0da2ac9 358/433: * mmm-syntax-propertize-function: Don't pass nil to mmm-set-local-variables |
Date: |
Thu, 15 Mar 2018 19:44:35 -0400 (EDT) |
branch: master
commit 0da2ac99c5c1f585284f3984767b6f4014623898
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
* mmm-syntax-propertize-function: Don't pass nil to mmm-set-local-variables
This is too similar to 61b9cf4.
---
mmm-region.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/mmm-region.el b/mmm-region.el
index aa6728a..9113f14 100644
--- a/mmm-region.el
+++ b/mmm-region.el
@@ -602,6 +602,10 @@ Return \((VAR VALUE) ...). In some cases, VAR will be of
the form
"Get the value of the local variable VAR saved for MODE and OVL, if any."
(cadr (assq var (mmm-get-saved-local-variables ovl mode))))
+;; FIXME: It's too easy to accidentally pass nil as MODE here.
+;; We probably should call this from `mmm-set-current-pair', and not
+;; rely on its callers to default to the primary mode when appropriate.
+;; Also, incorporate the opmimization from `mmm-fontify-region-list'.
(defun mmm-set-local-variables (mode ovl)
"Set all the local variables saved for MODE and OVL.
Looks up global, buffer and region saves. When MODE is nil, just
@@ -818,7 +822,7 @@ of the REGIONS covers START to STOP."
(font-lock-fontify-syntactic-keywords-region beg
end)))))))
(mmm-regions-in start stop))
(mmm-set-current-pair saved-mode saved-ovl)
- (mmm-set-local-variables saved-mode saved-ovl))))
+ (mmm-set-local-variables (or saved-mode mmm-primary-mode) saved-ovl))))
;;}}}
;;{{{ Indentation
- [elpa] master 357cee0 321/433: Revert "Refontify buffer when creating new region", (continued)
- [elpa] master 357cee0 321/433: Revert "Refontify buffer when creating new region", Dmitry Gutov, 2018/03/15
- [elpa] master 8a24631 293/433: Add js-mode vars to `mmm-save-local-variables`, Dmitry Gutov, 2018/03/15
- [elpa] master 45cf811 309/433: Document nxml-mode based setup, Dmitry Gutov, 2018/03/15
- [elpa] master 42ecef5 381/433: Allow omitting the close tag of the last PHP code block., Dmitry Gutov, 2018/03/15
- [elpa] master ff6aa17 391/433: Update NEWS, Dmitry Gutov, 2018/03/15
- [elpa] master 8535a68 385/433: * Enable MMM in ERB and PHP files with just one extension (#36), Dmitry Gutov, 2018/03/15
- [elpa] master c6f199d 252/433: Tested for only javascript <script> tags (Joe Kelsey), Dmitry Gutov, 2018/03/15
- [elpa] master 8b9c1e7 303/433: Switch mmm-erb.el to unix line endings, and add closing comment line, Dmitry Gutov, 2018/03/15
- [elpa] master ac4822d 295/433: Merge pull request #4 from dgutov/js-fix, Dmitry Gutov, 2018/03/15
- [elpa] master 86cb980 426/433: Write TODO some more, Dmitry Gutov, 2018/03/15
- [elpa] master 0da2ac9 358/433: * mmm-syntax-propertize-function: Don't pass nil to mmm-set-local-variables,
Dmitry Gutov <=
- [elpa] master e414b5b 314/433: Fix #12, Dmitry Gutov, 2018/03/15
- [elpa] master 631e7f1 408/433: Add c-symbol-char-key to the saved variables, Dmitry Gutov, 2018/03/15
- [elpa] master c493716 404/433: Revert "mmm-match-region: Return front-pos even without front-delim; likewise for back", Dmitry Gutov, 2018/03/15
- [elpa] master d2c8ade 428/433: More text, Dmitry Gutov, 2018/03/15
- [elpa] master 7661968 415/433: Merge pull request #74 from AdamNiederer/master, Dmitry Gutov, 2018/03/15
- [elpa] master 6812418 424/433: Add a FIXME, Dmitry Gutov, 2018/03/15
- [elpa] master 93cd2cf 412/433: Add function for narrowed indentation, Dmitry Gutov, 2018/03/15
- [elpa] master 16d937d 019/433: Added files required by automake., Dmitry Gutov, 2018/03/15
- [elpa] master 8e205dd 400/433: Don't use version.texi at all, Dmitry Gutov, 2018/03/15
- [elpa] master 2ca7e6a 300/433: Add header comment, provide description, Dmitry Gutov, 2018/03/15