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

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

[elpa] master 7fdf8ea 1/4: Be slightly less aggressive in ruby-mode


From: Artur Malabarba
Subject: [elpa] master 7fdf8ea 1/4: Be slightly less aggressive in ruby-mode
Date: Wed, 12 Oct 2016 19:48:54 +0000 (UTC)

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

    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

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