summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-06-03 09:06:44 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-06-03 09:06:44 +0000
commitebfbdcf4dffb423363965f6b41e574c69794db5f (patch)
treebb0961573ecafd77eb74d56dbd9b5ccb5fb6732b /sample
parent46c4975d9c25f7f336a23bde080420c5ed29ab0e (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/ruby-mode.el18
1 files changed, 11 insertions, 7 deletions
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)))