From 10c4bb29b237ccdbf99cfe8ef44c81de5a4a9018 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 2 Oct 2003 08:25:00 +0000 Subject: * time.c (time_load): restore instance variables (if any) before loading from marshaled data. * time.c (time_mdump): new marshal dumper. _dump is still available for compatibility. * time.c (time_mload): new marshal loader. * marshal.c (w_object): preserve instance variables for objects with marshal_dump. * marshal.c (r_object0): restore instance variables before calling marshal_load. * error.c (rb_warn_m): always return nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- misc/ruby-mode.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'misc') diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 8d9df41a4a..7728734b39 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -685,15 +685,18 @@ The variable ruby-indent-level controls the amount of indentation. (setq bol (point)) (end-of-line) (skip-chars-backward " \t") - (let ((pos (point))) - (while (and (re-search-backward "#" bol t) - (ruby-special-char-p)) - (forward-char -1)) + (let (end (pos (point))) + (beginning-of-line) + (while (and (re-search-forward "#" pos t) + (setq end (1- (point))) + (ruby-special-char-p end)) + (setq end nil)) + (goto-char (or end pos)) (skip-chars-backward " \t") (and (setq state (ruby-parse-region parse-start (point))) (nth 0 state) - (setq begin (nth 1 state)) + (setq begin (cdr (nth 1 state))) (goto-char pos))) (or (bobp) (forward-char -1)) (and -- cgit v1.2.3