]> git.eshelyaron.com Git - emacs.git/commit
Add new options for Ruby code indentation
authorDmitry Gutov <dgutov@yandex.ru>
Fri, 30 Dec 2022 21:58:26 +0000 (23:58 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Fri, 30 Dec 2022 22:00:21 +0000 (00:00 +0200)
commit8675f4136c7da7356e5578cf1eabda2f37a597e5
treef37bbb61f80912e30f2428c20b16c30c8e7ab2bc
parent4922de626f05f0c26bc732b082c30c5c18a88416
Add new options for Ruby code indentation

* lisp/progmodes/ruby-mode.el (ruby-block-indent)
(ruby-after-operator-indent, ruby-method-call-indent)
(ruby-parenless-call-arguments-indent): New options (bug#60186).
(ruby-smie-grammar): Specify associativity for "?".
(ruby-smie--indent-to-stmt): Add optional argument.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb: New cases.

* test/lisp/progmodes/ruby-mode-resources/ruby-method-call-indent.rb:
* test/lisp/progmodes/ruby-mode-resources/ruby-block-indent.rb:
* test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb:
* test/lisp/progmodes/ruby-mode-resources/
ruby-parenless-call-arguments-indent.rb: New files.

* test/lisp/progmodes/ruby-mode-tests.el: Add indentation tests for new files.
lisp/progmodes/ruby-mode.el
test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb [new file with mode: 0644]
test/lisp/progmodes/ruby-mode-resources/ruby-block-indent.rb [new file with mode: 0644]
test/lisp/progmodes/ruby-mode-resources/ruby-method-call-indent.rb [new file with mode: 0644]
test/lisp/progmodes/ruby-mode-resources/ruby-parenless-call-arguments-indent.rb [new file with mode: 0644]
test/lisp/progmodes/ruby-mode-resources/ruby.rb
test/lisp/progmodes/ruby-mode-tests.el