diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-06-03 09:06:44 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-06-03 09:06:44 +0000 |
commit | ebfbdcf4dffb423363965f6b41e574c69794db5f (patch) | |
tree | bb0961573ecafd77eb74d56dbd9b5ccb5fb6732b | |
parent | 46c4975d9c25f7f336a23bde080420c5ed29ab0e (diff) |
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | re.c | 8 | ||||
-rw-r--r-- | sample/ruby-mode.el | 18 |
2 files changed, 15 insertions, 11 deletions
@@ -169,7 +169,7 @@ kcode_reset_option() } } -extern int rb_in_eval; +extern int rb_in_compile; static void reg_expr_str(str, s, len) @@ -262,10 +262,10 @@ reg_raise(s, len, err, re) { VALUE desc = reg_desc(s, len, re); - if (rb_in_eval) - Raise(eRegxpError, "%s: %s", err, RSTRING(desc)->ptr); - else + if (rb_in_compile) Error("%s: %s", err, RSTRING(desc)->ptr); + else + Raise(eRegxpError, "%s: %s", err, RSTRING(desc)->ptr); } static VALUE diff --git a/sample/ruby-mode.el b/sample/ruby-mode.el index 8beb2ecebf..c2410f1fe6 100644 --- a/sample/ruby-mode.el +++ b/sample/ruby-mode.el @@ -193,12 +193,13 @@ The variable ruby-indent-level controls the amount of indentation. (skip-chars-backward " \t") (or (bolp) (forward-char -1)) (or (looking-at ruby-operator-chars) - (looking-at "[\\[({!?]") + (looking-at "[\\[({]") + (and (not modifier) (looking-at "[!?]")) (bolp) (and (looking-at ruby-symbol-chars) (forward-word -1) (or - (and modifier (bolp)) + (and (not modifier) (bolp)) (looking-at ruby-block-beg-re) (looking-at ruby-block-op-re) (looking-at ruby-block-mid-re) @@ -338,11 +339,14 @@ The variable ruby-indent-level controls the amount of indentation. (not (eq ?_ w)) (not (eq ?! w)) (not (eq ?? w)) - (progn - (goto-char (match-beginning 0)) - (if (looking-at ruby-modifier-re) - (ruby-expr-beg) - t)) + (skip-chars-forward " \t") + (if (not (eolp)) + (progn + (goto-char (match-beginning 0)) + (if (looking-at ruby-modifier-re) + (ruby-expr-beg t) + t)) + t) (goto-char pnt) (setq nest (cons (cons nil pnt) nest)) (setq depth (1+ depth))) |