diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-08 10:38:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-08 10:38:01 +0000 |
commit | 787686ffa7a91e007cd5999097fa337823cdf975 (patch) | |
tree | 2990d76976f0184b748fa64b06ddb964a1b5e273 /misc | |
parent | 0042bbc1c1757177be0742cf1dce692dbe58a407 (diff) | |
download | ruby-787686ffa7a91e007cd5999097fa337823cdf975.tar.gz |
* misc/ruby-mode.el (ruby-expr-beg): fix for invalid nest errors.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ruby-mode.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index c795773032..bdd6fc73fe 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -457,9 +457,8 @@ The variable ruby-indent-level controls the amount of indentation. (or (eq (char-syntax (char-before (point))) ?w) (ruby-special-char-p)))) nil) - ((and (progn (goto-char start) (eq option 'heredoc)) - (not (ruby-singleton-class-p))) - t) + ((and (eq option 'heredoc) (< space 0)) + (not (progn (goto-char start) (ruby-singleton-class-p)))) ((or (looking-at ruby-operator-re) (looking-at "[\\[({,;]") (and (looking-at "[!?]") @@ -532,7 +531,7 @@ The variable ruby-indent-level controls the amount of indentation. (t (setq in-string (point)) (goto-char end)))) - ((looking-at "/=") + ((looking-at "/=") (goto-char pnt)) ((looking-at "/") (cond @@ -788,7 +787,7 @@ The variable ruby-indent-level controls the amount of indentation. (setq indent (ruby-indent-size (current-column) (nth 2 state)))) (t (setq indent (+ (current-column) ruby-indent-level))))) - + ((and (nth 2 state) (< (nth 2 state) 0)) ; in negative nest (setq indent (ruby-indent-size (current-column) (nth 2 state))))) (when indent @@ -1125,7 +1124,7 @@ balanced expression is found." (concat "^[ \t]*\\(def\\|class\\|module\\)[ \t]+" "\\(" ;; \\. and :: for class method - "\\([A-Za-z_]" ruby-symbol-re "*\\|\\.\\|::" "\\)" + "\\([A-Za-z_]" ruby-symbol-re "*\\|\\.\\|::" "\\)" "+\\)") nil t) (progn |