Function: semantic-foreign-tag
semantic-foreign-tag is a byte-compiled function defined in tag.el.gz.
Signature
(semantic-foreign-tag &optional TAG)
Documentation
Return a copy of TAG as a foreign tag, or nil if it can't be done.
TAG defaults to the tag at point in current buffer.
See also semantic-foreign-tag-p.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/tag.el.gz
(defun semantic-foreign-tag (&optional tag)
"Return a copy of TAG as a foreign tag, or nil if it can't be done.
TAG defaults to the tag at point in current buffer.
See also `semantic-foreign-tag-p'."
(or tag (setq tag (semantic-current-tag)))
(when (semantic-tag-p tag)
(let ((ftag (semantic-tag-copy tag nil t))
;; Do extra work for the doc strings, since this is a
;; common use case.
(doc (condition-case nil
(semantic-documentation-for-tag tag)
(error nil))))
;; A foreign tag must carry its originating buffer file name!
(when (semantic--tag-get-property ftag :filename)
(semantic--tag-put-property ftag :mode (semantic-tag-mode tag))
(semantic--tag-put-property ftag :documentation doc)
(semantic--tag-put-property ftag :foreign-flag t)
ftag))))