From eb9708f38671aa6446a89acc755f3341f5cb59b6 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 23 Jan 2002 07:30:43 +0000 Subject: * array.c (Init_Array): remove Array#filter. * object.c (rb_mod_initialize): should accept zero argument. * object.c (rb_mod_cmp): should raise ArgumentError if inheritance/inclusion relation between two classes/modules is not defined. [new] * io.c (rb_io_fsync): new method. [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- misc/ruby-mode.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'misc/ruby-mode.el') diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 56cb1ed2aa..a33e6d43e4 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -252,9 +252,12 @@ The variable ruby-indent-level controls the amount of indentation. (looking-at ruby-block-mid-re)) (goto-char (match-end 0)) (looking-at "\\>")) + ((eq option 'expr-qstr) + (looking-at "[a-zA-Z][a-zA-z0-9_]* +%[^ \t]")) + ((eq option 'expr-re) + (looking-at "[a-zA-Z][a-zA-z0-9_]* +/[^ \t]")) (t - (and (not (eq option 'expr-arg)) - (looking-at "[a-zA-Z][a-zA-z0-9_]* +/[^ \t]")))))))))) + (looking-at "[a-zA-Z][a-zA-z0-9_]* +"))))))))) (defun ruby-forward-string (term &optional end no-error expand) (let ((n 1) (c (string-to-char term)) @@ -310,7 +313,7 @@ The variable ruby-indent-level controls the amount of indentation. (goto-char indent-point)))) ((looking-at "/") (cond - ((and (not (eobp)) (ruby-expr-beg)) + ((and (not (eobp)) (ruby-expr-beg 'expr-re)) (if (ruby-forward-string "/" indent-point t t) nil (setq in-string (point)) @@ -319,7 +322,8 @@ The variable ruby-indent-level controls the amount of indentation. (goto-char pnt)))) ((looking-at "%") (cond - ((and (not (eobp)) (ruby-expr-beg 'expr-arg) + ((and (not (eobp)) + (ruby-expr-beg 'expr-qstr) (not (looking-at "%=")) (looking-at "%[Qqrxw]?\\(.\\)")) (goto-char (match-beginning 1)) -- cgit v1.2.3