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

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

[nongnu] elpa/jade-mode 039b637cee 016/128: new blank line + single tab


From: ELPA Syncer
Subject: [nongnu] elpa/jade-mode 039b637cee 016/128: new blank line + single tab = full indent
Date: Sat, 29 Jan 2022 08:24:42 -0500 (EST)

branch: elpa/jade-mode
commit 039b637cee8266d75d86bf5de5c3410dd47e48ac
Author: Brian Carlson <brian.m.carlson@gmail.com>
Commit: Brian Carlson <brian.m.carlson@gmail.com>

    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"



reply via email to

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