diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-12 05:05:38 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-12 05:05:38 +0000 |
commit | e1d3451f36aca1d0ccff466c7a1301626c07dcfc (patch) | |
tree | 7dcd6cca89a282716ad372ef8b9526b8dd1095a4 | |
parent | 581d01e6a089469805799e0d17826596831454bc (diff) |
* misc/ruby-mode.el (ruby-imenu-create-index-in-block): Fix the
regexp to only pick definition lines properly. `module_funtion'
is not a definition of a module named `_function'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | misc/ruby-mode.el | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Tue Aug 12 13:57:11 2008 Akinori MUSHA <[email protected]> + + * misc/ruby-mode.el (ruby-imenu-create-index-in-block): Fix the + regexp to only pick definition lines properly. `module_funtion' + is not a definition of a module named `_function'. + Mon Aug 11 14:39:46 2008 Yukihiro Matsumoto <[email protected]> * class.c (clone_method): should copy cbase in cref as well. diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index 7c63a85a78..40d23f3581 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -178,7 +178,7 @@ Also ignores spaces after parenthesis when 'space." (let ((index-alist '()) name next pos decl sing) (goto-char beg) - (while (re-search-forward "^\\s *\\(\\(class\\>\\(\\s *<<\\)?\\|module\\>\\)\\s *\\([^\(<\n ]+\\)\\|\\(def\\|alias\\)\\>\\s *\\([^\(\n ]+\\)\\)" end t) + (while (re-search-forward "^\\s *\\(\\(class\\s +\\|\\(class\\s *<<\\s *\\)\\|module\\s +\\)\\([^\(<\n ]+\\)\\|\\(def\\|alias\\)\\s +\\([^\(\n ]+\\)\\)" end t) (setq sing (match-beginning 3)) (setq decl (match-string 5)) (setq next (match-end 0)) |