From 4f51d814183316c3e97da1dc13cf6945b5a76f2f Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 4 Jul 2000 04:17:26 +0000 Subject: matz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- misc/ruby-mode.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'misc/ruby-mode.el') diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 763c076d8a..cffd853bb7 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -547,12 +547,15 @@ The variable ruby-indent-level controls the amount of indentation. (setq bol (point)) (end-of-line) (skip-chars-backward " \t") - (and (re-search-backward "#" (save-excursion - (beginning-of-line) - (point)) t) - (setq state (ruby-parse-region parse-start (point))) - (nth 0 state) - (goto-char (nth 0 state))) + (let ((pos (point))) + (and + (re-search-backward "#" (save-excursion + (beginning-of-line) + (point)) t) + (skip-chars-backward " \t") + (setq state (ruby-parse-region parse-start (point))) + (nth 0 state) + (goto-char pos))) (or (bobp) (forward-char -1)) (and (or (and (looking-at ruby-symbol-re) -- cgit v1.2.3