[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 37f6dea 396/433: mmm-indent-line: Use primary mode if subm
From: |
Dmitry Gutov |
Subject: |
[elpa] master 37f6dea 396/433: mmm-indent-line: Use primary mode if submode ends right here |
Date: |
Thu, 15 Mar 2018 19:44:42 -0400 (EDT) |
branch: master
commit 37f6dea57c6a4c5a75612aa52ec4580dceed6ed5
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
mmm-indent-line: Use primary mode if submode ends right here
---
mmm-region.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/mmm-region.el b/mmm-region.el
index 7fecc1f..61a5ddc 100644
--- a/mmm-region.el
+++ b/mmm-region.el
@@ -856,7 +856,7 @@ calls each respective submode's
`syntax-propertize-function'."
;;{{{ Indentation
(defvar mmm-indent-line-function 'mmm-indent-line
- "The function to call to indent inside a primary mode region.
+ "The function to call to indent a line.
This will be the value of `indent-line-function' for the whole
buffer. It's supposed to delegate to the appropriate submode's
indentation function. See `mmm-indent-line' as the starting point.")
@@ -867,8 +867,12 @@ indentation function. See `mmm-indent-line' as the
starting point.")
(save-excursion
(back-to-indentation)
(mmm-update-submode-region)
- (get (or mmm-current-submode mmm-primary-mode)
- 'mmm-indent-line-function))))
+ (get
+ (if (and mmm-current-overlay
+ (> (overlay-end mmm-current-overlay) (point)))
+ mmm-current-submode
+ mmm-primary-mode)
+ 'mmm-indent-line-function))))
;;}}}
(provide 'mmm-region)
- [elpa] master c68cee0 411/433: Merge pull request #73 from AdamNiederer/master, (continued)
- [elpa] master c68cee0 411/433: Merge pull request #73 from AdamNiederer/master, Dmitry Gutov, 2018/03/15
- [elpa] master 15c766d 216/433: * mmm-vars.el (mmm-classes-alist): Document new keywords., Dmitry Gutov, 2018/03/15
- [elpa] master 6e50485 268/433: Added html-php submode class., Dmitry Gutov, 2018/03/15
- [elpa] master c6a30e3 251/433: Trimmed ancient docstring., Dmitry Gutov, 2018/03/15
- [elpa] master 30811bc 249/433: Added new files to be byte-compiled (Joe Kelsey), Dmitry Gutov, 2018/03/15
- [elpa] master 7b783ee 308/433: Don't confuse script tags with EJS tags, Dmitry Gutov, 2018/03/15
- [elpa] master 00c99c7 278/433: (lisp_LISP): Added mmm-myghty.el., Dmitry Gutov, 2018/03/15
- [elpa] master ad24c9d 275/433: * mmm-noweb.el (mmm-syntax-region-list), Dmitry Gutov, 2018/03/15
- [elpa] master a27d7af 329/433: Allow toggling whitespace-mode after initialization, Dmitry Gutov, 2018/03/15
- [elpa] master ce3cb79 367/433: * mmm-update-mode-info: bind `buffer-file-truename' to nil, Dmitry Gutov, 2018/03/15
- [elpa] master 37f6dea 396/433: mmm-indent-line: Use primary mode if submode ends right here,
Dmitry Gutov <=
- [elpa] master 1b9406d 361/433: Released 0.5.0, Dmitry Gutov, 2018/03/15
- [elpa] master f9e4dd5 376/433: Fix #26, Dmitry Gutov, 2018/03/15
- [elpa] master f5ea03a 399/433: Don't try to enable jit-lock in temp buffers, Dmitry Gutov, 2018/03/15
- [elpa] master 18bb050 392/433: Released 0.5.2, Dmitry Gutov, 2018/03/15
- [elpa] master 0cc4df5 410/433: Document mode transition hooks, Dmitry Gutov, 2018/03/15
- [elpa] master 8dcb066 414/433: Reword docstring & fix indentation, Dmitry Gutov, 2018/03/15
- [elpa] master c9a857a 407/433: Save font-lock-syntactic-face-function per major mode, Dmitry Gutov, 2018/03/15
- [elpa] master 545b85d 327/433: added more cc-mode variables to mmm-save-local-variables, Dmitry Gutov, 2018/03/15
- [elpa] master d58aacc 365/433: Fix mmm-add-to-major-mode-preferences docstring, Dmitry Gutov, 2018/03/15
- [elpa] master 3d83b62 383/433: Add mmm-defaults.el (#36), Dmitry Gutov, 2018/03/15