Function: semantic--analyze-refs-full-lookup-with-parents

semantic--analyze-refs-full-lookup-with-parents is a byte-compiled function defined in refs.el.gz.

Signature

(semantic--analyze-refs-full-lookup-with-parents TAG SCOPE)

Documentation

Perform a lookup for all occurrences of TAG based on TAG's SCOPE.

TAG should be the tag currently under point.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/analyze/refs.el.gz
(defun semantic--analyze-refs-full-lookup-with-parents (tag scope)
  "Perform a lookup for all occurrences of TAG based on TAG's SCOPE.
TAG should be the tag currently under point."
  (let* ((classmatch (semantic-tag-class tag))
	 (plist (mapcar (lambda (T) (semantic-tag-name T)) (oref scope parents)))
	 ;; The first item in the parent list
	 (name (car plist))
	 ;; Stuff from the simple list.
	 (simple (semantic--analyze-refs-full-lookup-simple tag t))
	 ;; Find all hits for the first parent name.
	 (brute (semanticdb-find-tags-collector
		 (lambda (table tags)
		   (semanticdb-deep-find-tags-by-name-method table name tags)
		   )
		 nil nil t))
	 ;; Prime the answer.
	 (answer (semantic--analyze-refs-find-tags-with-parent simple plist))
	 )
    ;; First parent is already search to initialize "brute".
    (setq plist (cdr plist))

    ;; Go through the list of parents, and try to find matches.
    ;; As we cycle through plist, for each level look for NAME,
    ;; and compare the named-parent, and also dive into the next item of
    ;; plist.
    (while (and plist brute)

      ;; Find direct matches
      (let* ((direct (semantic--analyze-refs-find-child-in-find-results
		      brute (semantic-tag-name tag) classmatch))
	     (pdirect (semantic--analyze-refs-find-tags-with-parent
		       direct plist)))
	(setq answer (append pdirect answer)))

      ;; The next set of search items.
      (setq brute (semantic--analyze-refs-find-child-in-find-results
		   brute (car plist) 'type))

      (setq plist (cdr plist)))

    ;; Brute now has the children from the very last match.
    (let* ((direct (semantic--analyze-refs-find-child-in-find-results
		    brute (semantic-tag-name tag) classmatch))
	   )
      (setq answer (append direct answer)))

    answer))