From ee9a1f7ee9573b11a0e5f6ccf0258a290087f6a4 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Wed, 16 Mar 2016 15:58:21 +0200 Subject: [PATCH] Support safe navigation operator in non-SMIE indentation code * 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 60480d603c3..2389f742937 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -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)))) -- 2.39.2