Hi Eric,
Here is a new patch for semanticdb-find.el. It includes my previous
fix for function `semanticdb-find-tags-collector', and a new
compatibility fix for `semanticdb-find-translate-path-default'.
The compatibility problem was that in Emacs 20.7 `add-to-list' don't
support the APPEND argument :-(
As I was fixing that, I rewrote the code to be more efficient. I
guess you will be happy with that ;-)
David
Index: semanticdb-find.el
===================================================================
RCS file: /cvsroot/cedet/cedet/semantic/semanticdb-find.el,v
retrieving revision 1.6
diff -c -r1.6 semanticdb-find.el
*** semanticdb-find.el 1 Aug 2003 17:27:39 -0000 1.6
--- semanticdb-find.el 14 Aug 2003 10:56:40 -0000
***************
*** 144,168 ****
(semantic-find-tags-included (semanticdb-get-tags path)))
(t (semantic-find-tags-included path))))
(matchedtables (list semanticdb-current-table))
! )
;; Loop over all include tags adding to matchedtables
(while includetags
! (let* ((nexttable (semanticdb-find-table-for-include (car includetags)))
! (moreincludes nil))
! ;; (message "Scanning %s" (semantic-tag-name (car includetags)))
! (when (and nexttable
! (not (memq nexttable matchedtables))
! (semanticdb-equivalent-mode nexttable (current-buffer))
! )
! (setq moreincludes (semantic-find-tags-included (semanticdb-get-tags nexttable)))
! ;; Add to list of tables
! (add-to-list 'matchedtables nexttable t)
! ;; Add new includes to list
! (setq includetags (append includetags moreincludes))
! ))
! (setq includetags (cdr includetags))
! )
! matchedtables))
;;;###autoload
(define-overload semanticdb-find-table-for-include (includetag &optional table)
--- 144,166 ----
(semantic-find-tags-included (semanticdb-get-tags path)))
(t (semantic-find-tags-included path))))
(matchedtables (list semanticdb-current-table))
! nexttable)
;; Loop over all include tags adding to matchedtables
(while includetags
! (setq nexttable (semanticdb-find-table-for-include (car includetags)))
! ;; (message "Scanning %s" (semantic-tag-name (car includetags)))
! (when (and nexttable
! (not (memq nexttable matchedtables))
! (semanticdb-equivalent-mode nexttable (current-buffer))
! )
! ;; Add to list of tables
! (push nexttable matchedtables)
! ;; Queue new includes to list
! (setq includetags (append includetags
! (semantic-find-tags-included
! (semanticdb-get-tags nexttable)))))
! (setq includetags (cdr includetags)))
! (nreverse matchedtables)))
;;;###autoload
(define-overload semanticdb-find-table-for-include (includetag &optional table)
***************
*** 224,239 ****
See `semanticdb-find-translate-path' for details on PATH.
FIND-FILE-MATCH indicates that any time a match is found, the file
associated with that tag should be loaded into a buffer."
! (let ((tables (semanticdb-find-translate-path path))
! (found nil))
! (while tables
! (let ((match (funcall function (car tables))))
! (when match
(when find-file-match
! (save-excursion (semanticdb-set-buffer (car tables))))
! (setq found (cons (cons (car tables) match) found))
! ))
! (setq tables (cdr tables)))
found))
;;;###autoload
--- 222,238 ----
See `semanticdb-find-translate-path' for details on PATH.
FIND-FILE-MATCH indicates that any time a match is found, the file
associated with that tag should be loaded into a buffer."
! (let (found match)
! (dolist (table (semanticdb-find-translate-path path))
! ;; If FIND-FILE-MATCH is non-nil, skip tables of class
! ;; `semanticdb-search-results-table', not associated to a file.
! (unless (and find-file-match
! (child-of-class-p (class-of table)
! semanticdb-search-results-table))
! (when (setq match (funcall function table))
(when find-file-match
! (save-excursion (semanticdb-set-buffer table)))
! (push (cons table match) found))))
found))
;;;###autoload
|