From 578c21bc0316661f211dd73a9eb65c8213bd372f Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Mon, 16 Sep 2013 02:42:26 +0300 Subject: [PATCH] * lisp/progmodes/ruby-mode.el (ruby-operator-re): Consider line continuation character an operator, as far as indentation is concerned. Fixes: debbugs:15369 --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/ruby-mode.el | 2 +- test/indent/ruby.rb | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 01400a96009..44a81ee32fc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-09-15 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-operator-re): Consider line + continuation character an operator, as far as indentation is + concerned (Bug#15369). + 2013-09-15 Martin Rudalics * 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'." ruby-block-end-re "\\|}\\|\\]\\)") "Regexp to match where the indentation gets shallower.") -(defconst ruby-operator-re "[-,.+*/%&|^~=<>:]" +(defconst ruby-operator-re "[-,.+*/%&|^~=<>:]\\|\\\\$" "Regexp to match operators.") (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 if something == :== do_something end + +# Bug#15369 +MSG = 'Separate every 3 digits in the integer portion of a number' \ + 'with underscores(_).' -- 2.39.2