diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ruby-mode.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 7f7cebef75..efd61254f4 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -522,7 +522,14 @@ The variable ruby-indent-level controls the amount of indentation. (re-search-backward "#" (save-excursion (beginning-of-line) (point)) t) + (save-excursion + (forward-char -1) + (not (looking-at "\\?"))) (skip-chars-backward " \t") + (if (save-excursion + (forward-char -1) + (looking-at "\\?")) + (skip-chars-forward " \t")) (setq state (ruby-parse-region parse-start (point))) (nth 0 state) (goto-char pos))) |