diff options
| author | Dmitry Gutov | 2013-09-16 02:42:26 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2013-09-16 02:42:26 +0300 |
| commit | 578c21bc0316661f211dd73a9eb65c8213bd372f (patch) | |
| tree | e8aa2759a8c9ac1d9acae0107404a33c73d8c89c | |
| parent | 745d3809b6b0cc594a3e1f5dd24cd043b4c3532d (diff) | |
| download | emacs-578c21bc0316661f211dd73a9eb65c8213bd372f.tar.gz emacs-578c21bc0316661f211dd73a9eb65c8213bd372f.zip | |
* lisp/progmodes/ruby-mode.el (ruby-operator-re): Consider line
continuation character an operator, as far as indentation is
concerned.
Fixes: debbugs:15369
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 2 | ||||
| -rw-r--r-- | test/indent/ruby.rb | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 01400a96009..44a81ee32fc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-09-15 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * progmodes/ruby-mode.el (ruby-operator-re): Consider line | ||
| 4 | continuation character an operator, as far as indentation is | ||
| 5 | concerned (Bug#15369). | ||
| 6 | |||
| 1 | 2013-09-15 Martin Rudalics <rudalics@gmx.at> | 7 | 2013-09-15 Martin Rudalics <rudalics@gmx.at> |
| 2 | 8 | ||
| 3 | * window.el (window--state-put-2): Don't process buffer state | 9 | * window.el (window--state-put-2): Don't process buffer state |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 902616e3023..95206c15390 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -132,7 +132,7 @@ This should only be called after matching against `ruby-here-doc-beg-re'." | |||
| 132 | ruby-block-end-re "\\|}\\|\\]\\)") | 132 | ruby-block-end-re "\\|}\\|\\]\\)") |
| 133 | "Regexp to match where the indentation gets shallower.") | 133 | "Regexp to match where the indentation gets shallower.") |
| 134 | 134 | ||
| 135 | (defconst ruby-operator-re "[-,.+*/%&|^~=<>:]" | 135 | (defconst ruby-operator-re "[-,.+*/%&|^~=<>:]\\|\\\\$" |
| 136 | "Regexp to match operators.") | 136 | "Regexp to match operators.") |
| 137 | 137 | ||
| 138 | (defconst ruby-symbol-chars "a-zA-Z0-9_" | 138 | (defconst ruby-symbol-chars "a-zA-Z0-9_" |
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb index af1bbb9d8ab..6c9b9775b48 100644 --- a/test/indent/ruby.rb +++ b/test/indent/ruby.rb | |||
| @@ -71,3 +71,7 @@ end | |||
| 71 | if something == :== | 71 | if something == :== |
| 72 | do_something | 72 | do_something |
| 73 | end | 73 | end |
| 74 | |||
| 75 | # Bug#15369 | ||
| 76 | MSG = 'Separate every 3 digits in the integer portion of a number' \ | ||
| 77 | 'with underscores(_).' | ||