aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/ruby-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r--lisp/progmodes/ruby-mode.el20
1 files changed, 7 insertions, 13 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 1c9f0f43086..35d0cc44ed8 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -629,19 +629,13 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
629 ;; because when `.' is inside the line, the 629 ;; because when `.' is inside the line, the
630 ;; additional indentation from it looks out of place. 630 ;; additional indentation from it looks out of place.
631 ((smie-rule-parent-p ".") 631 ((smie-rule-parent-p ".")
632 (let (smie--parent) 632 ;; Traverse up the call chain until the parent is not `.',
633 (save-excursion 633 ;; or `.' at indentation, or at eol.
634 ;; Traverse up the parents until the parent is "." at 634 (while (and (not (ruby-smie--bosp))
635 ;; indentation, or any other token. 635 (equal (nth 2 (smie-backward-sexp ".")) ".")
636 (while (and (let ((parent (smie-indent--parent))) 636 (not (ruby-smie--bosp)))
637 (goto-char (cadr parent)) 637 (forward-char -1))
638 (save-excursion 638 (smie-indent-virtual))
639 (unless (integerp (car parent)) (forward-char -1))
640 (not (ruby-smie--bosp))))
641 (progn
642 (setq smie--parent nil)
643 (smie-rule-parent-p "."))))
644 (smie-rule-parent))))
645 (t (smie-rule-parent)))))) 639 (t (smie-rule-parent))))))
646 (`(:after . ,(or `"(" "[" "{")) 640 (`(:after . ,(or `"(" "[" "{"))
647 ;; FIXME: Shouldn't this be the default behavior of 641 ;; FIXME: Shouldn't this be the default behavior of