diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-09-12 05:37:38 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-09-12 05:37:38 +0000 |
commit | a058870812c058c0c125fd1bf3edcab5a6656659 (patch) | |
tree | 68bde87194755712893e5efa4d7f9d2f5312df10 /misc | |
parent | 837ac1a8368ba3eb7411b2a5b3a38bc7506be127 (diff) | |
download | ruby-a058870812c058c0c125fd1bf3edcab5a6656659.tar.gz ruby-a058870812c058c0c125fd1bf3edcab5a6656659.tar.xz ruby-a058870812c058c0c125fd1bf3edcab5a6656659.zip |
matz: 1.6.0 final (hopufully)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ruby-mode.el | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index e884e0699..b5d70403e 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -544,18 +544,20 @@ The variable ruby-indent-level controls the amount of indentation. (or (not (eq ?| (char-after (point)))) (save-excursion (or (eolp) (forward-char -1)) - (and (search-backward "|") - (skip-chars-backward " \t\n") - (and (not (eolp)) - (progn - (forward-char -1) - (not (looking-at "\\{"))) - (progn - (forward-word -1) - (not (looking-at "do\\>[^_]"))))))))) + (cond + ((search-backward "|" nil t) + (skip-chars-backward " \t\n") + (and (not (eolp)) + (progn + (forward-char -1) + (not (looking-at "\\{"))) + (progn + (forward-word -1) + (not (looking-at "do\\>[^_]"))))) + (t t)))))) (setq indent (+ indent ruby-indent-level))))))) indent))) - + (defun ruby-electric-brace (arg) (interactive "P") (self-insert-command (prefix-numeric-value arg)) |