From bbe0af6be1f85ea93c3f5fe8ca1e100c784a01e9 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 25 Oct 2007 17:06:29 +0000 Subject: * parse.y (parser_yylex): dot at the head of the line denote line continuation from previous one to support fluent interface. [experimental] * misc/ruby-mode.el (ruby-calculate-indent): support fluent dot. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- misc/ruby-mode.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'misc/ruby-mode.el') diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 25c6b3008d..6e9ac7ae45 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -727,15 +727,19 @@ The variable ruby-indent-level controls the amount of indentation. (not (looking-at (concat "\\<\\(" ruby-block-hanging-re "\\)\\>"))) (eq (ruby-deep-indent-paren-p t) 'space) (not (bobp))) - (save-excursion - (widen) - (goto-char (or begin parse-start)) - (skip-syntax-forward " ") - (current-column))) + (widen) + (goto-char (or begin parse-start)) + (skip-syntax-forward " ") + (current-column)) ((car (nth 1 state)) indent) (t (+ indent ruby-indent-level)))))))) - indent))) + (goto-char indent-point) + (beginning-of-line) + (skip-syntax-forward " ") + (if (looking-at "\\.[^.]") + (+ indent ruby-indent-level) + indent)))) (defun ruby-electric-brace (arg) (interactive "P") -- cgit v1.2.3