Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

new blank line + single tab = full indent

  • Loading branch information...
commit 039b637cee8266d75d86bf5de5c3410dd47e48ac 1 parent b8778ae
@brianc brianc authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 sws-mode.el
View
14 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"
Please sign in to comment.
Something went wrong with that request. Please try again.