Skip to content

Commit

Permalink
* misc/ruby-mode.el (ruby-expr-beg): fix for invalid nest errors.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Feb 8, 2011
1 parent 0042bbc commit 787686f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Tue Feb 8 19:38:00 2011 Nobuyoshi Nakada <[email protected]>

* misc/ruby-mode.el (ruby-expr-beg): fix for invalid nest errors.

Tue Feb 8 19:22:59 2011 KOSAKI Motohiro <[email protected]>

* configure.in (AC_MSG_CHECKING): fixed typo. the patch is
Expand Down
11 changes: 5 additions & 6 deletions misc/ruby-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[!?]")
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 787686f

Please sign in to comment.