summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ruby-mode.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2014-03-21 06:26:39 +0200
committerDmitry Gutov <dgutov@yandex.ru>2014-03-21 06:26:39 +0200
commit1fc8f6559a8ef1df2f55a12d6dd70ee62f34f1f6 (patch)
treead0019e034c09c9767c2f5eb77011b1f8e20ece4 /lisp/progmodes/ruby-mode.el
parentdada060d9f65ce57fca99bef6e5a69ee88e126cf (diff)
downloademacs-1fc8f6559a8ef1df2f55a12d6dd70ee62f34f1f6.tar.gz
emacs-1fc8f6559a8ef1df2f55a12d6dd70ee62f34f1f6.tar.bz2
emacs-1fc8f6559a8ef1df2f55a12d6dd70ee62f34f1f6.zip
Fix bug#17050
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Add indentation rule for ` @ '.
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r--lisp/progmodes/ruby-mode.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index fe9346047c6..e05aef80e86 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -650,6 +650,10 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
;; because we want to reject hanging tokens at bol, too.
(unless (or (eolp) (forward-comment 1))
(cons 'column (current-column)))))
+ (`(:before . " @ ")
+ (save-excursion
+ (skip-chars-forward " \t")
+ (cons 'column (current-column))))
(`(:before . "do") (ruby-smie--indent-to-stmt))
(`(:before . ".")
(if (smie-rule-sibling-p)