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

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

[elpa] externals/ruby-end 96c19df26d 22/91: adds option for adding the b


From: ELPA Syncer
Subject: [elpa] externals/ruby-end 96c19df26d 22/91: adds option for adding the blank line between statement and end
Date: Wed, 25 Jan 2023 19:58:25 -0500 (EST)

branch: externals/ruby-end
commit 96c19df26df16e0c2e35177cac26302e2eab87af
Author: Matt Briggs <matt@mattbriggs.net>
Commit: Matt Briggs <matt@mattbriggs.net>

    adds option for adding the blank line between statement and end
---
 ruby-end.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/ruby-end.el b/ruby-end.el
index 0310c7c5fc..79a01fc105 100644
--- a/ruby-end.el
+++ b/ruby-end.el
@@ -61,6 +61,11 @@
   :type 'boolean
   :group 'ruby)
 
+(defcustom ruby-end-insert-newline t
+  "*Disable or enable additional newline in between statement and end"
+  :type 'boolean
+  :group 'ruby)
+
 (defconst ruby-end-expand-postfix-modifiers-before-re
   "\\(?:if\\|unless\\|while\\)"
   "Regular expression matching statements before point.")
@@ -103,8 +108,10 @@
            (current-column))))
     (save-excursion
       (newline)
-      (indent-line-to (+ whites ruby-indent-level))
-      (newline)
+      (if ruby-end-insert-newline
+          (progn
+            (indent-line-to (+ whites ruby-indent-level))
+            (newline)))
       (indent-line-to whites)
       (insert "end"))))
 



reply via email to

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