branch: master
commit 7fdf8ea7433ed5f25ad41519880af1659da68696
Author: Artur Malabarba <bruce.connor...@gmail.com>
Commit: Artur Malabarba <bruce.connor...@gmail.com>

    Be slightly less aggressive in ruby-mode
---
 aggressive-indent.el |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 02bb39e..e727464 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -243,6 +243,12 @@ This is for internal use only.  For user customization, use
                 '(and (derived-mode-p 'coq-mode)
                       (not (string-match "\\.[[:space:]]*$"
                                          (thing-at-point 'line))))))
+(eval-after-load 'ruby-mode
+  '(add-to-list 'aggressive-indent--internal-dont-indent-if
+                '(when (derived-mode-p 'ruby-mode)
+                   (let ((line (thing-at-point 'line)))
+                     (and (stringp line)
+                          (string-match "\\b\\(if\\|case\\|do\\|begin\\) *$" 
line))))))
 
 (defcustom aggressive-indent-dont-indent-if '()
   "List of variables and functions to prevent aggressive indenting.

Reply via email to