aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2013-09-16 02:42:26 +0300
committerDmitry Gutov2013-09-16 02:42:26 +0300
commit578c21bc0316661f211dd73a9eb65c8213bd372f (patch)
treee8aa2759a8c9ac1d9acae0107404a33c73d8c89c
parent745d3809b6b0cc594a3e1f5dd24cd043b4c3532d (diff)
downloademacs-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/ChangeLog6
-rw-r--r--lisp/progmodes/ruby-mode.el2
-rw-r--r--test/indent/ruby.rb4
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 @@
12013-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
12013-09-15 Martin Rudalics <rudalics@gmx.at> 72013-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
71if something == :== 71if something == :==
72 do_something 72 do_something
73end 73end
74
75# Bug#15369
76MSG = 'Separate every 3 digits in the integer portion of a number' \
77 'with underscores(_).'