branch: elpa/jade-mode
commit 039b637cee8266d75d86bf5de5c3410dd47e48ac
Author: Brian Carlson <[email protected]>
Commit: Brian Carlson <[email protected]>
new blank line + single tab = full indent
---
sws-mode.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/sws-mode.el b/sws-mode.el
index 75d417b4eb..e3f1765346 100644
--- a/sws-mode.el
+++ b/sws-mode.el
@@ -27,12 +27,14 @@
(defun sws-do-indent-line ()
"Performs line indentation"
;;if we are not tabbed out past max indent
- (if (< (current-indentation) (sws-max-indent))
- (indent-to (+ (current-indentation) sws-tab-width))
- ;; if at max indent move text to beginning of line
- (progn
- (beginning-of-line)
- (delete-horizontal-space))))
+ (if (sws-empty-line-p)
+ (indent-to (sws-max-indent))
+ (if (< (current-indentation) (sws-max-indent))
+ (indent-to (+ (current-indentation) sws-tab-width))
+ ;; if at max indent move text to beginning of line
+ (progn
+ (beginning-of-line)
+ (delete-horizontal-space)))))
(defun sws-indent-line ()
"Indents current line"