summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-12-14 06:50:43 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-12-14 06:50:43 +0000
commit9d228b13deccfdf23f44e2c465f723a2a7b3bcbd (patch)
tree9a4d769804c389b6b03bbfdf65e8e0a03288c8e8 /misc
parentc18d3740a925e8752c3b93acea6087fb0e03be53 (diff)
19991214
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rw-r--r--misc/ruby-mode.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index d5dd137..098ddd5 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -203,7 +203,12 @@ The variable ruby-indent-level controls the amount of indentation.
(looking-at "[\\[({]")
(and (not modifier) (looking-at "[!?]"))
(and (looking-at ruby-symbol-re)
- (forward-word -1)
+ (save-restriction
+ (let ((p (point)))
+ (beginning-of-line)
+ (narrow-to-region (point) p)
+ (goto-char p)
+ (forward-word -1)))
(if (and (not modifier) (bolp))
t
(if (or (looking-at ruby-block-beg-re)