Function: semantic-format-tag-abbreviate-default
semantic-format-tag-abbreviate-default is a byte-compiled function
defined in format.el.gz.
Signature
(semantic-format-tag-abbreviate-default TAG &optional PARENT COLOR)
Documentation
Return an abbreviated string describing TAG.
Optional argument PARENT is a parent tag in the tag hierarchy. In this case PARENT refers to containment, not inheritance. Optional argument COLOR means highlight the prototype with font-lock colors. This is a simple C like default.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/format.el.gz
(defun semantic-format-tag-abbreviate-default (tag &optional parent color)
"Return an abbreviated string describing TAG.
Optional argument PARENT is a parent tag in the tag hierarchy.
In this case PARENT refers to containment, not inheritance.
Optional argument COLOR means highlight the prototype with font-lock colors.
This is a simple C like default."
;; Do lots of complex stuff here.
(let ((class (semantic-tag-class tag))
(name (semantic-format-tag-canonical-name tag parent color))
(suffix "")
(prefix "")
str)
(cond ((eq class 'function)
(setq suffix "()"))
((eq class 'include)
(setq suffix "<>"))
((eq class 'variable)
(setq suffix (if (semantic-tag-variable-default tag)
"=" "")))
((eq class 'label)
(setq suffix ":"))
((eq class 'code)
(setq prefix "{"
suffix "}"))
((eq class 'type)
(setq suffix "{}"))
)
(setq str (concat prefix name suffix))
str))