diff options
| author | Dmitry Gutov | 2012-12-26 20:45:19 +0400 |
|---|---|---|
| committer | Dmitry Gutov | 2012-12-26 20:45:19 +0400 |
| commit | db590ef6e30d0b962e226ce5c5a003cc52a17953 (patch) | |
| tree | c781d2e3e1513a1b2cac43be94b08eb7c2a99e35 /lisp/progmodes/ruby-mode.el | |
| parent | f5c81c80c109fcaca04b25e08c34848110e2550b (diff) | |
| download | emacs-db590ef6e30d0b962e226ce5c5a003cc52a17953.tar.gz emacs-db590ef6e30d0b962e226ce5c5a003cc52a17953.zip | |
* lisp/progmodes/ruby-mode.el (ruby-indent-beg-re): Only allow "class",
"module" and "def" to have indentation before them. Regression
from 2012-09-07T04:15:56Z!dgutov@yandex.ru (see the new test).
* test/automated/ruby-mode-tests.el
(ruby-indent-after-block-in-continued-expression): New test.
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 41a9aaed6f9..4d50eec6d5e 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -64,8 +64,9 @@ | |||
| 64 | "Regexp to match keywords that nest without blocks.") | 64 | "Regexp to match keywords that nest without blocks.") |
| 65 | 65 | ||
| 66 | (defconst ruby-indent-beg-re | 66 | (defconst ruby-indent-beg-re |
| 67 | (concat "^\\s *" (regexp-opt '("class" "module" "def" "if" "unless" "case" | 67 | (concat "^\\(\\s *" (regexp-opt '("class" "module" "def")) "\\|" |
| 68 | "while" "until" "for" "begin")) "\\_>") | 68 | (regexp-opt '("if" "unless" "case" "while" "until" "for" "begin")) |
| 69 | "\\)\\_>") | ||
| 69 | "Regexp to match where the indentation gets deeper.") | 70 | "Regexp to match where the indentation gets deeper.") |
| 70 | 71 | ||
| 71 | (defconst ruby-modifier-beg-keywords | 72 | (defconst ruby-modifier-beg-keywords |