1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-07 20:54:32 +00:00

* lisp/progmodes/ruby-mode.el (ruby-smie--bosp): Anything that goes

after `=' is probably a new expression.
This commit is contained in:
Dmitry Gutov 2013-10-27 07:25:03 +04:00
parent ca7e59d46c
commit c8c605ac9c
3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2013-10-27 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-smie--bosp): Anything that goes
after `=' is probably a new expression.
2013-10-27 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
* man.el (man-imenu-title): New option.

View File

@ -334,7 +334,7 @@ explicitly declared in magic comment."
(defun ruby-smie--bosp ()
(save-excursion (skip-chars-backward " \t")
(or (bolp) (eq (char-before) ?\;))))
(or (bolp) (memq (char-before) '(?\; ?=)))))
(defun ruby-smie--implicit-semi-p ()
(save-excursion

View File

@ -220,6 +220,11 @@ def bar
.baz
end
# http://stackoverflow.com/questions/17786563/emacs-ruby-mode-if-expressions-indentation
tee = if foo
bar
end
# Examples below still fail with `ruby-use-smie' on:
foo = [1, 2, 3].map do |i|