From: Dmitry Gutov Date: Tue, 17 Dec 2013 12:04:23 +0000 (+0200) Subject: * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Indent ternary if. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~373 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=35b249a653c0f855d6d0d421be216e6465585ce4;p=emacs.git * lisp/progmodes/ruby-mode.el (ruby-smie-rules): Indent ternary if. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a0651917f3f..9a424b239c2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-12-17 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-smie-rules): Indent ternary if. + 2013-12-17 Stefan Monnier * net/shr.el (shr-insert-document): Remove unused var diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index e5148d29a97..54eba5b9164 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -577,6 +577,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." "+=" "-=" "*=" "/=" "%=" "**=" "&=" "|=" "^=" "|" "<<=" ">>=" "&&=" "||=" "and" "or")) (if (smie-rule-parent-p ";" nil) ruby-indent-level)) + (`(:after . ,(or "?" ":")) ruby-indent-level) (`(:before . "begin") (unless (save-excursion (skip-chars-backward " \t") (bolp)) (smie-rule-parent))) diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb index 19bc0d03d47..c132b01fd86 100644 --- a/test/indent/ruby.rb +++ b/test/indent/ruby.rb @@ -330,3 +330,7 @@ end %^abc^ ddd + +qux = foo ? + bar : + tee