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

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

[elpa] master a897a41 360/433: * mmm-erb.el: Update comments


From: Dmitry Gutov
Subject: [elpa] master a897a41 360/433: * mmm-erb.el: Update comments
Date: Thu, 15 Mar 2018 19:44:36 -0400 (EDT)

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

    * mmm-erb.el: Update comments
---
 mmm-erb.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/mmm-erb.el b/mmm-erb.el
index 9ccd312..86ec45a 100644
--- a/mmm-erb.el
+++ b/mmm-erb.el
@@ -25,8 +25,8 @@
 
 ;;; Commentary:
 
-;; This file contains definitions of JavaScript, CSS, ERB and EJS submode
-;; classes, and well as support functions for proper indentation.
+;; This file contains definitions of ERB and EJS submode classes, and well as
+;; support functions for proper indentation.
 
 ;; Usage:
 
@@ -97,6 +97,12 @@
     (if (and mmm-current-overlay mmm-current-submode
              (< (overlay-start mmm-current-overlay) (point-at-bol)))
         ;; Region starts before the current line (and contains indentation).
+        ;; If it starts on the current line, then either first part of the line
+        ;; is in primary mode, or we're on the first line of a script or style
+        ;; tag contents. In the latter case, better to also indent it according
+        ;; to the primary mode (as text): `js-indent-line' ignores narrowing,
+        ;; gets confused by the angle bracket on the previous line and thus
+        ;; breaks our "top level" heuristic.
         (mmm-erb-indent-line-submode)
       (mmm-erb-indent-line-primary))
     (when (> offset 0) (forward-char offset))))



reply via email to

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