1. xemacs
  2. edit-utils

Commits

sperber-guest  committed a2290a6 Merge

Correct ruby detection, func-menu.el

  • Participants
  • Parent commits daf0043, 6ede7e7
  • Branches default

Comments (0)

Files changed (2)

File ChangeLog

View file
+2011-05-11  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* func-menu.el (fume-function-name-regexp-ruby):
+	* func-menu.el (fume-find-next-ruby-function-name):
+	Handle the module concept for Ruby correctly in this file, as
+	suggested by Hans de Graaff in tracker issue 355.
+
 2010-04-28  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 2.43 released.

File func-menu.el

View file
 ;; Albert Davidson Chou <Al_Chou@CyberDude.com>
 ;; Claus Brunzema <mail@cbrunzema.de>
 (defvar fume-function-name-regexp-ruby
-  "^\\s-*\\(class\\|def\\)+\\s-*\\([^(\n ]+\\)")
+  "^\\s-*\\(class\\|module\\|def\\)+\\s-*\\([^(\n ]+\\)")
 
 ;; Python support
 ;; Shuichi Koga <skoga@virginia.edu>
           (goto-char (match-beginning 0))
           (cond ((looking-at "^\\s-*def")
                  (re-search-backward
-                  "\n?\\s-*class\\s-*\\([A-Z][A-Za-z0-9_]*\\)\\s-*" nil t)
+                  "\n?\\s-*\\(class\\|module\\)\\s-*\\([A-Z][A-Za-z0-9_]*\\)\\s-*" nil nil)
 		 (let* ((classname (buffer-substring
-				    (match-beginning 1) (match-end 1))))
+				    (match-beginning 2) (match-end 2))))
 		   (if (not (string-match (concat "^" classname "\\.") retname))
 		       (setq retname (concat classname "." retname))))))
 	  (cons retname retpnt)))))