Function: semantic-format-tag-summarize-with-file-default

semantic-format-tag-summarize-with-file-default is a byte-compiled function defined in format.el.gz.

Signature

(semantic-format-tag-summarize-with-file-default TAG &optional PARENT COLOR)

Documentation

Summarize TAG in a reasonable way.

Optional argument PARENT is the parent type if TAG is a detail. Optional argument COLOR means highlight the prototype with font-lock colors.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/format.el.gz
(defun semantic-format-tag-summarize-with-file-default (tag &optional parent color)
  "Summarize TAG in a reasonable way.
Optional argument PARENT is the parent type if TAG is a detail.
Optional argument COLOR means highlight the prototype with font-lock colors."
  (let* ((proto (semantic-format-tag-prototype tag nil color))
	 (file (semantic-tag-file-name tag))
	 )
    ;; Nothing for tag?  Try parent.
    (when (and (not file) (and parent))
      (setq file (semantic-tag-file-name parent)))
    ;; Don't include the file name if we can't find one, or it is the
    ;; same as the current buffer.
    (if (or (not file)
	    (string= file (buffer-file-name (current-buffer))))
	proto
      (setq file (file-name-nondirectory file))
      (when color
	(setq file (semantic--format-colorize-text file 'label)))
      (concat file ": " proto))))