]> code.delx.au - gnu-emacs-elpa/commitdiff
Don't indent on empty line.
authorArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 26 Oct 2014 00:04:00 +0000 (01:04 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 26 Oct 2014 00:04:00 +0000 (01:04 +0100)
aggressive-indent.el

index 32dfa8e1657856dcc75f7a9181f32ad3fff0c95f..af6d2ac5268cc0fe9ebaf8a9c7c682cf8ca45286 100644 (file)
@@ -127,7 +127,8 @@ commands will NOT be followed by a re-indent."
   '((memq this-command aggressive-indent-protected-commands)
     (region-active-p)
     buffer-read-only
-    (null (buffer-modified-p)))
+    (null (buffer-modified-p))
+    (string-match "\\`[[:blank:]]*\n?\\'" (thing-at-point 'line)))
   "List of forms which prevent indentation when they evaluate to non-nil.
 This is for internal use only. For user customization, use
 `aggressive-indent-dont-indent-if' instead.")