From: Dmitry Gutov Date: Wed, 16 Mar 2016 13:58:21 +0000 (+0200) Subject: Support safe navigation operator in non-SMIE indentation code X-Git-Tag: emacs-25.0.93~89^2~57 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ee9a1f7ee9573b11a0e5f6ccf0258a290087f6a4;p=emacs.git 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. --- 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))))