diff options
| author | Dmitry Gutov | 2022-12-19 21:01:27 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2022-12-19 21:06:07 +0200 |
| commit | 2b1fdbffcb595bcd72fa9aa3db674c6985042bcb (patch) | |
| tree | d096889d882ed2d06cf548bbadb4bdea294440f4 /test/lisp/progmodes/ruby-mode-resources/ruby-method-params-indent.rb | |
| parent | b9e813f79f2d7afb5f14caad17a865e66af17f15 (diff) | |
| download | emacs-2b1fdbffcb595bcd72fa9aa3db674c6985042bcb.tar.gz emacs-2b1fdbffcb595bcd72fa9aa3db674c6985042bcb.zip | |
ruby-method-params-indent: New user option
* lisp/progmodes/ruby-mode.el (ruby-method-params-indent):
New option (bug#60110).
(ruby-smie-rules): Use it.
* etc/NEWS: Mention it.
* test/lisp/progmodes/ruby-mode-resources/ruby.rb:
Ensure the var's value is default.
* test/lisp/progmodes/ruby-mode-resources/ruby-method-params-indent.rb:
New file.
* test/lisp/progmodes/ruby-mode-tests.el (ruby-deftest-indent):
New macro, use it to run the indentation test using the new file.
Disable the :expensive-test tag, because neither runs for "longer
than some few seconds", both take significantly below 1s.
Diffstat (limited to 'test/lisp/progmodes/ruby-mode-resources/ruby-method-params-indent.rb')
| -rw-r--r-- | test/lisp/progmodes/ruby-mode-resources/ruby-method-params-indent.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/lisp/progmodes/ruby-mode-resources/ruby-method-params-indent.rb b/test/lisp/progmodes/ruby-mode-resources/ruby-method-params-indent.rb new file mode 100644 index 00000000000..2b665797397 --- /dev/null +++ b/test/lisp/progmodes/ruby-mode-resources/ruby-method-params-indent.rb | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | class C | ||
| 2 | def self.foo( | ||
| 3 | baz, | ||
| 4 | bar | ||
| 5 | ) = | ||
| 6 | what | ||
| 7 | |||
| 8 | def foo=( | ||
| 9 | baz, | ||
| 10 | bar | ||
| 11 | ) | ||
| 12 | hello | ||
| 13 | end | ||
| 14 | end | ||
| 15 | |||
| 16 | # Local Variables: | ||
| 17 | # ruby-method-params-indent: 0 | ||
| 18 | # End: | ||