aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/ruby-mode.el
diff options
context:
space:
mode:
authorDmitry Gutov2013-10-14 04:51:20 +0300
committerDmitry Gutov2013-10-14 04:51:20 +0300
commit1eda1d8d34c864df5b89464e51f0cbb8e46c5afd (patch)
treee0680733d53ad1d1e5ccbd74e947c660ede5081e /lisp/progmodes/ruby-mode.el
parente70181b829d01a7a674c099978688347427a5f33 (diff)
downloademacs-1eda1d8d34c864df5b89464e51f0cbb8e46c5afd.tar.gz
emacs-1eda1d8d34c864df5b89464e51f0cbb8e46c5afd.zip
* lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p): Handle
methods ending with `?' and `!'. * test/indent/ruby.rb: More examples for bug#15594, both failing and now passing.
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r--lisp/progmodes/ruby-mode.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 3441c35de35..a29540ad3a3 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -327,7 +327,9 @@ explicitly declared in magic comment."
327 327
328(defun ruby-smie--args-separator-p (pos) 328(defun ruby-smie--args-separator-p (pos)
329 (and 329 (and
330 (eq ?w (char-syntax (char-before))) 330 (or (eq (char-syntax (preceding-char)) '?w)
331 (and (memq (preceding-char) '(?! ??))
332 (eq (char-syntax (char-before (1- (point)))) '?w)))
331 (< pos (point-max)) 333 (< pos (point-max))
332 (memq (char-syntax (char-after pos)) '(?w ?\")))) 334 (memq (char-syntax (char-after pos)) '(?w ?\"))))
333 335