1 new commit in xemacs-base:
https://bitbucket.org/xemacs/xemacs-base/commits/992e3ef1f6f9/
changeset:   992e3ef1f6f9
user:        sperber
date:        2013-03-09 14:24:20
summary:     In imenu, REGEXP may also be a search function now.
2013-03-08  Michael Sperber  <mike(a)xemacs.org>
	* imenu.el (imenu--generic-function): REGEXP may also be a search
	function now, as in GNU Emacs.
affected #:  2 files
diff -r a3e50fc78cea130c1b0dcfebce65506ebbb69a78 -r
992e3ef1f6f9a7621f610a77554f49ecc3d10706 ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-08  Michael Sperber  <mike(a)xemacs.org>
+
+	* imenu.el (imenu--generic-function): REGEXP may also be a search
+	function now, as in GNU Emacs.
+
 2013-02-21  Michael Sperber  <mike(a)xemacs.org>
 
 	* file-util.el:
diff -r a3e50fc78cea130c1b0dcfebce65506ebbb69a78 -r
992e3ef1f6f9a7621f610a77554f49ecc3d10706 imenu.el
--- a/imenu.el
+++ b/imenu.el
@@ -730,10 +730,13 @@
 MENU-TITLE is a string used as the title for the submenu or nil if the
 entries are not nested.
 
-REGEXP is a regexp that should match a construct in the buffer that is
-to be displayed in the menu; i.e., function or variable definitions,
-etc.  It contains a substring which is the name to appear in the
-menu.  See the info section on Regexps for more information.
+REGEXP is a regexp that should match a construct in the buffer
+that is to be displayed in the menu; i.e., function or variable
+definitions, etc.  It contains a substring which is the name to
+appear in the menu.  See the info section on Regexps for more
+information.  REGEXP may also be a function, called without
+arguments.  It is expected to search backwards.  It shall return
+true and set `match-data' iff it finds another element.
 
 INDEX points to the substring in REGEXP that contains the name (of the
 function, variable or type) that is to appear in the menu.
@@ -778,7 +781,9 @@
 		    (rest (nthcdr 4 pat)))
 		;; Go backwards for convenience of adding items in order.
 		(goto-char (point-max))
-		(while (re-search-backward regexp nil t)
+	      (while (and (if (functionp regexp)
+			      (funcall regexp)
+			    (re-search-backward regexp nil t)))
 		  (imenu-progress-message prev-pos nil t)
 		  (setq beg (match-beginning index))
 		  ;; Add this sort of submenu only when we've found an
Repository URL: 
https://bitbucket.org/xemacs/xemacs-base/
--
This is a commit notification from 
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches