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

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

[elpa] master ef50950 1/2: Fix #70 - Do indent on empty line


From: Artur Malabarba
Subject: [elpa] master ef50950 1/2: Fix #70 - Do indent on empty line
Date: Fri, 01 Apr 2016 14:04:28 +0000

branch: master
commit ef509502cdd228c8ce0a562bbf411e5f98beaaf1
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>

    Fix #70 - Do indent on empty line
    
    I have no idea why this was disabled in the first place, but now we have
    a reason to re-enable it.
---
 aggressive-indent.el |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 187b76d..764a332 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba <address@hidden>
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.5
+;; Version: 1.5.1
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -190,14 +190,13 @@ change."
     (null (buffer-modified-p))
     (and (boundp 'smerge-mode) smerge-mode)
     (let ((line (thing-at-point 'line)))
-      (when (stringp line)
-        (or (string-match "\\`[[:blank:]]*\n?\\'" line)
-            ;; If the user is starting to type a comment.
-            (and (stringp comment-start)
-                 (string-match (concat "\\`[[:blank:]]*"
-                                       (substring comment-start 0 1)
-                                       "[[:blank:]]*$")
-                               line)))))
+      (and (stringp line)
+           ;; If the user is starting to type a comment.
+           (stringp comment-start)
+           (string-match (concat "\\`[[:blank:]]*"
+                                 (substring comment-start 0 1)
+                                 "[[:blank:]]*$")
+                         line)))
     (let ((sp (syntax-ppss)))
       ;; Comments.
       (or (and (not aggressive-indent-comments-too) (elt sp 4))



reply via email to

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