зеркало из https://github.com/github/ruby.git
* misc/ruby-mode.el (ruby-accurate-end-of-block): restrict search
region. * misc/ruby-mode.el (ruby-parse-partial): reversed wrong patch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
af7ca8b51b
Коммит
f94534efbc
|
@ -1,3 +1,10 @@
|
||||||
|
Tue Jul 30 19:48:51 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
|
* misc/ruby-mode.el (ruby-accurate-end-of-block): restrict search
|
||||||
|
region.
|
||||||
|
|
||||||
|
* misc/ruby-mode.el (ruby-parse-partial): reversed wrong patch.
|
||||||
|
|
||||||
Tue Jul 30 17:21:13 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Tue Jul 30 17:21:13 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* misc/ruby-mode.el (ruby-accurate-end-of-block): incomplete block
|
* misc/ruby-mode.el (ruby-accurate-end-of-block): incomplete block
|
||||||
|
|
|
@ -173,8 +173,9 @@ Also ignores spaces after parenthesis when 'space.")
|
||||||
|
|
||||||
(defun ruby-accurate-end-of-block (&optional end)
|
(defun ruby-accurate-end-of-block (&optional end)
|
||||||
(let (state)
|
(let (state)
|
||||||
|
(or end (setq end (point-max)))
|
||||||
(while (and (setq state (apply 'ruby-parse-partial end state))
|
(while (and (setq state (apply 'ruby-parse-partial end state))
|
||||||
(>= (nth 2 state) 0)))))
|
(>= (nth 2 state) 0) (< (point) end)))))
|
||||||
|
|
||||||
(defun ruby-mode-variables ()
|
(defun ruby-mode-variables ()
|
||||||
(set-syntax-table ruby-mode-syntax-table)
|
(set-syntax-table ruby-mode-syntax-table)
|
||||||
|
@ -483,8 +484,8 @@ The variable ruby-indent-level controls the amount of indentation.
|
||||||
(t
|
(t
|
||||||
(error (format "bad string %s"
|
(error (format "bad string %s"
|
||||||
(buffer-substring (point) pnt)
|
(buffer-substring (point) pnt)
|
||||||
)))))
|
))))))
|
||||||
(list in-string nest depth pcol)))
|
(list in-string nest depth pcol))
|
||||||
|
|
||||||
(defun ruby-parse-region (start end)
|
(defun ruby-parse-region (start end)
|
||||||
(let (state)
|
(let (state)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче