* 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/trunk@9302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0c65f66757
commit
62c220a74a
@ -1,3 +1,12 @@
|
|||||||
|
Sun Sep 25 00:42:11 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
Sat Sep 24 21:19:39 2005 Minero Aoki <aamine@loveruby.net>
|
Sat Sep 24 21:19:39 2005 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
* ext/strscan/strscan.c: document enhancement.
|
* ext/strscan/strscan.c: document enhancement.
|
||||||
|
@ -152,7 +152,7 @@
|
|||||||
Also ignores spaces after parenthesis when 'space."
|
Also ignores spaces after parenthesis when 'space."
|
||||||
:group 'ruby)
|
: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.
|
"*Deep indent lists in parenthesis when non-nil. t means continuous line.
|
||||||
Also ignores spaces after parenthesis when 'space."
|
Also ignores spaces after parenthesis when 'space."
|
||||||
:group 'ruby)
|
:group 'ruby)
|
||||||
@ -312,11 +312,10 @@ The variable ruby-indent-level controls the amount of indentation.
|
|||||||
(or (eq (char-syntax (char-before (point))) ?w)
|
(or (eq (char-syntax (char-before (point))) ?w)
|
||||||
(ruby-special-char-p))))
|
(ruby-special-char-p))))
|
||||||
nil)
|
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 "[\\[({,;]")
|
(looking-at "[\\[({,;]")
|
||||||
(and (or (not (eq option 'heredoc))
|
(and (looking-at "[!?]")
|
||||||
(< space 0))
|
|
||||||
(looking-at "[!?]")
|
|
||||||
(or (not (eq option 'modifier))
|
(or (not (eq option 'modifier))
|
||||||
(bolp)
|
(bolp)
|
||||||
(save-excursion (forward-char -1) (looking-at "\\Sw"))))
|
(save-excursion (forward-char -1) (looking-at "\\Sw"))))
|
||||||
@ -727,6 +726,7 @@ The variable ruby-indent-level controls the amount of indentation.
|
|||||||
(goto-char (or begin parse-start))
|
(goto-char (or begin parse-start))
|
||||||
(skip-syntax-forward " ")
|
(skip-syntax-forward " ")
|
||||||
(current-column)))
|
(current-column)))
|
||||||
|
((car (nth 1 state)) indent)
|
||||||
(t
|
(t
|
||||||
(+ indent ruby-indent-level))))))))
|
(+ indent ruby-indent-level))))))))
|
||||||
indent)))
|
indent)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user