mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
Indent '.' relative to the first sibling expression
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Indent '.' relative to the first sibling expression, instead of the parent token (bug#17213).
This commit is contained in:
parent
04f5525fbb
commit
5b705bc97d
@ -661,7 +661,9 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
|
||||
(`(:before . ".")
|
||||
(if (smie-rule-sibling-p)
|
||||
(and ruby-align-chained-calls 0)
|
||||
ruby-indent-level))
|
||||
(smie-backward-sexp ".")
|
||||
(cons 'column (+ (current-column)
|
||||
ruby-indent-level))))
|
||||
(`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure"))
|
||||
(smie-rule-parent))
|
||||
(`(:before . "when")
|
||||
|
@ -317,6 +317,11 @@ def bar
|
||||
.baz
|
||||
end
|
||||
|
||||
abc(foo
|
||||
.bar,
|
||||
tee
|
||||
.qux)
|
||||
|
||||
# http://stackoverflow.com/questions/17786563/emacs-ruby-mode-if-expressions-indentation
|
||||
tee = if foo
|
||||
bar
|
||||
|
Loading…
Reference in New Issue
Block a user