Function: semanticdb-expand-nested-tag-c++-mode
semanticdb-expand-nested-tag-c++-mode is a byte-compiled function
defined in c.el.gz.
Signature
(semanticdb-expand-nested-tag-c++-mode TAG)
Documentation
Expand TAG if it has a fully qualified name.
For types with a :parent, create faux namespaces to put TAG into.
Override semanticdb-expand-nested-tag in c++-mode buffers.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/bovine/c.el.gz
(define-mode-local-override semanticdb-expand-nested-tag c++-mode (tag)
"Expand TAG if it has a fully qualified name.
For types with a :parent, create faux namespaces to put TAG into."
(let ((p (semantic-tag-get-attribute tag :parent)))
(if (and p (semantic-tag-of-class-p tag 'type))
;; Expand the tag
(let ((s (semantic-analyze-split-name p))
(newtag (semantic-tag-copy tag nil t)))
;; Erase the qualified name.
(semantic-tag-put-attribute newtag :parent nil)
;; Fixup the namespace name
(setq s (if (stringp s) (list s) (nreverse s)))
;; Loop over all the parents, creating the nested
;; namespace.
(require 'semantic/db-typecache)
(dolist (namespace s)
(setq newtag (semanticdb-typecache-faux-namespace
namespace (list newtag)))
)
;; Return the last created namespace.
newtag)
;; Else, return tag unmodified.
tag)))