]> code.delx.au - gnu-emacs/commitdiff
Support safe navigation operator in non-SMIE indentation code
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 16 Mar 2016 13:58:21 +0000 (15:58 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 16 Mar 2016 14:16:50 +0000 (16:16 +0200)
* lisp/progmodes/ruby-mode.el (ruby-calculate-indent):
Support safe navigation operator in non-SMIE indentation code.
Cherry-picked from
https://github.com/ruby/ruby/commit/68e16ddd7961b86e5013e62ae2954e88638de058.

lisp/progmodes/ruby-mode.el

index 60480d603c33492215829884647aaa3d8c8367a5..2389f742937261b3d338b4920097fe652f0a6827 100644 (file)
@@ -1374,7 +1374,7 @@ delimiter."
       (goto-char ruby-indent-point)
       (beginning-of-line)
       (skip-syntax-forward " ")
-      (if (looking-at "\\.[^.]")
+      (if (looking-at "\\.[^.]\\|&\\.")
           (+ indent ruby-indent-level)
         indent))))