Function: semantic--analyze-refs-find-tags-with-parent
semantic--analyze-refs-find-tags-with-parent is a byte-compiled
function defined in refs.el.gz.
Signature
(semantic--analyze-refs-find-tags-with-parent FIND-RESULTS PARENTS)
Documentation
Find in FIND-RESULTS all tags with PARENTS.
NAME is the name of the tag needing finding. PARENTS is a list of names.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/analyze/refs.el.gz
(defun semantic--analyze-refs-find-tags-with-parent (find-results parents)
"Find in FIND-RESULTS all tags with PARENTS.
NAME is the name of the tag needing finding.
PARENTS is a list of names."
(let ((ans nil) (usingnames nil))
;; Loop over the find-results passed in.
(semanticdb-find-result-mapc
(lambda (tag db)
(let* ((p (semantic-tag-named-parent tag))
(ps (when (stringp p) (semantic-analyze-split-name p))))
(when (stringp ps) (setq ps (list ps)))
(when ps
;; If there is a perfect match, then use it.
(if (equal ps parents)
(push (list db tag) ans))
;; No match, find something from our list of using names.
;; Do we need to split UN?
(save-excursion
(semantic-go-to-tag tag db)
(setq usingnames nil)
(let ((imports (semantic-ctxt-imported-packages)))
;; Derive the names from all the using statements.
(mapc (lambda (T)
(setq usingnames
(cons (semantic-format-tag-name-from-anything T) usingnames)))
imports))
(dolist (UN usingnames)
(when (equal (cons UN ps) parents)
(push (list db tag) ans)
(setq usingnames (cdr usingnames))))
))))
find-results)
ans))