[前][次][番号順一覧][スレッド一覧]

ruby-changes:18800

From: nobu <ko1@a...>
Date: Tue, 8 Feb 2011 19:40:20 +0900 (JST)
Subject: [ruby-changes:18800] Ruby:r30825 (trunk): * misc/ruby-mode.el (ruby-expr-beg): fix for invalid nest errors.

nobu	2011-02-08 19:38:01 +0900 (Tue, 08 Feb 2011)

  New Revision: 30825

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30825

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

  Modified files:
    trunk/ChangeLog
    trunk/misc/ruby-mode.el

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 30824)
+++ ChangeLog	(revision 30825)
@@ -1,3 +1,7 @@
+Tue Feb  8 19:38:00 2011  Nobuyoshi Nakada  <nobu@r...>
+
+	* misc/ruby-mode.el (ruby-expr-beg): fix for invalid nest errors.
+
 Tue Feb  8 19:22:59 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* configure.in (AC_MSG_CHECKING): fixed typo. the patch is
Index: misc/ruby-mode.el
===================================================================
--- misc/ruby-mode.el	(revision 30824)
+++ misc/ruby-mode.el	(revision 30825)
@@ -457,9 +457,8 @@
                (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 @@
          (t
           (setq in-string (point))
           (goto-char end))))
-       ((looking-at "/=") 
+       ((looking-at "/=")
         (goto-char pnt))
        ((looking-at "/")
         (cond
@@ -788,7 +787,7 @@
           (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 @@
                (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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]