diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-24 15:43:17 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-24 15:43:17 +0000 |
commit | 6cffa8e4f885e314493811a6e8e837b19f520895 (patch) | |
tree | 4d69d10504270457467ce75f34ab96c0b8912aac /misc/ruby-mode.el | |
parent | c1ce646a53428fef7216189efca71f735f1f7e5c (diff) |
* misc/ruby-mode.el (ruby-expr-beg): deal with heredoc separately.
fixed: [ruby-list:41168]
* misc/ruby-mode.el (ruby-calculate-indent): not to deepen indent
level for continuous line inside parentheses.
http://nabeken.tdiary.net/20050915.html#p02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc/ruby-mode.el')
-rw-r--r-- | misc/ruby-mode.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index e0dd56846c..e68dc32f08 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -152,7 +152,7 @@ Also ignores spaces after parenthesis when 'space." :group 'ruby) -(defcustom ruby-deep-indent-paren '(?\( t) +(defcustom ruby-deep-indent-paren '(?\( ?\[ t) "*Deep indent lists in parenthesis when non-nil. t means continuous line. Also ignores spaces after parenthesis when 'space." :group 'ruby) @@ -312,11 +312,10 @@ The variable ruby-indent-level controls the amount of indentation. (or (eq (char-syntax (char-before (point))) ?w) (ruby-special-char-p)))) nil) - ((or (save-excursion (goto-char start) (looking-at ruby-operator-re)) + ((and (eq option 'heredoc) (< space 0)) t) + ((or (looking-at ruby-operator-re) (looking-at "[\\[({,;]") - (and (or (not (eq option 'heredoc)) - (< space 0)) - (looking-at "[!?]") + (and (looking-at "[!?]") (or (not (eq option 'modifier)) (bolp) (save-excursion (forward-char -1) (looking-at "\\Sw")))) @@ -327,7 +326,7 @@ The variable ruby-indent-level controls the amount of indentation. "|" ruby-block-op-re "|" ruby-block-mid-re "\\)\\>"))) (goto-char (match-end 0)) - (not (looking-at "\\s_"))) + (not (looking-at "\\s_"))) ((eq option 'expr-qstr) (looking-at "[a-zA-Z][a-zA-z0-9_]* +%[^ \t]")) ((eq option 'expr-re) @@ -727,6 +726,7 @@ The variable ruby-indent-level controls the amount of indentation. (goto-char (or begin parse-start)) (skip-syntax-forward " ") (current-column))) + ((car (nth 1 state)) indent) (t (+ indent ruby-indent-level)))))))) indent))) |