Function: semantic-flatten-tags-table
semantic-flatten-tags-table is an autoloaded and byte-compiled
function defined in sort.el.gz.
Signature
(semantic-flatten-tags-table &optional TABLE)
Documentation
Flatten the tags table TABLE.
All tags in TABLE, and all components of top level tags in TABLE will appear at the top level of list. Tags promoted to the top of the list will still appear unmodified as components of their parent tags.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/sort.el.gz
;;; Tag Table Flattening
;;
;; In the 1.4 search API, there was a parameter "search-parts" which
;; was used to find tags inside other tags. This was used
;; infrequently, mostly for completion/jump routines. These types
;; of commands would be better off with a flattened list, where all
;; tags appear at the top level.
;;;###autoload
(defun semantic-flatten-tags-table (&optional table)
"Flatten the tags table TABLE.
All tags in TABLE, and all components of top level tags
in TABLE will appear at the top level of list.
Tags promoted to the top of the list will still appear
unmodified as components of their parent tags."
(let* ((table (semantic-something-to-tag-table table))
;; Initialize the starting list with our table.
(lists (list table)))
(mapc (lambda (tag)
(let ((components (semantic-tag-components tag)))
(if (and components
;; unpositioned tags can be hazardous to
;; completion. Do we need any type of tag
;; here? - EL
(semantic-tag-with-position-p (car components)))
(setq lists (cons
(semantic-flatten-tags-table components)
lists)))))
table)
(apply #'append (nreverse lists))))