diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ruby-mode.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 556f72387d..2faec59307 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -270,10 +270,12 @@ The variable ruby-indent-level controls the amount of indentation. (forward-char -1) (or (looking-at ruby-operator-re) (looking-at "[\\[({,;]") - (and (or (eq option 'modifier) - (not (eq option 'heredoc)) + (and (or (not (eq option 'heredoc)) (< space 0)) - (looking-at "[!?]")) + (looking-at "[!?]") + (or (not (eq option 'modifier)) + (bolp) + (save-excursion (forward-char -1) (looking-at "\\Sw")))) (and (looking-at ruby-symbol-re) (skip-chars-backward ruby-symbol-chars) (cond |