emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master df0d56b 406/433: Fix regression from the previous commit


From: Dmitry Gutov
Subject: [elpa] master df0d56b 406/433: Fix regression from the previous commit
Date: Thu, 15 Mar 2018 19:44:44 -0400 (EDT)

branch: master
commit df0d56b460d01f82f4af13c84617f1bd282e46d6
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Fix regression from the previous commit
    
    * Fix void-function error ("another error" in
      https://gist.github.com/blaenk/edcd2d4280dc5fc99a83, #56)
    
    * Just skip narrowing for cc-mode submodes
---
 mmm-region.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/mmm-region.el b/mmm-region.el
index f805877..547b351 100644
--- a/mmm-region.el
+++ b/mmm-region.el
@@ -512,11 +512,8 @@ is non-nil, don't quit if the info is already there."
                 ;; These can't be in the local variables list, because we
                 ;; replace their actual values, but we want to use their
                 ;; original values elsewhere.
-                (unless (bound-and-true-p c-buffer-is-cc-mode)
-                  ;; TODO: Remove this conditional after cc-mode
-                  ;; respects submode boundaries.
-                  (put mode 'mmm-fontify-region-function
-                       font-lock-fontify-region-function))
+                (put mode 'mmm-fontify-region-function
+                     font-lock-fontify-region-function)
                 (put mode 'mmm-beginning-of-syntax-function
                      syntax-begin-function)
                 (put mode 'mmm-syntax-propertize-function
@@ -808,7 +805,10 @@ of the REGIONS covers START to STOP."
                   (save-restriction
                     (let ((font-lock-dont-widen t)
                           syntax-ppss-last syntax-ppss-cache)
-                      (when ovl (narrow-to-region beg end))
+                      ;; TODO: Remove this conditional when cc-mode
+                      ;; respects submode boundaries.
+                      (when (and ovl (not (memq mode mmm-c-derived-modes)))
+                        (narrow-to-region beg end))
                       (funcall func beg end nil)))
                   ;; Catch changes in font-lock cache.
                   (mmm-save-changed-local-variables



reply via email to

[Prev in Thread] Current Thread [Next in Thread]