summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
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)))