Function: semantic-documentation-comment-preceding-tag

semantic-documentation-comment-preceding-tag is a byte-compiled function defined in doc.el.gz.

Signature

(semantic-documentation-comment-preceding-tag &optional TAG NOSNARF)

Documentation

Find a comment preceding TAG.

If TAG is nil. use the tag under point. Searches the space between TAG and the preceding tag for a comment, and converts the comment into clean documentation. Optional argument NOSNARF with a value of lex means to return just the lexical token and not the string.

Aliases

semantic-documentation-comment-preceeding-tag (obsolete since 25.1)

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/doc.el.gz
(defun semantic-documentation-comment-preceding-tag (&optional tag nosnarf)
  "Find a comment preceding TAG.
If TAG is nil.  use the tag under point.
Searches the space between TAG and the preceding tag for a comment,
and converts the comment into clean documentation.
Optional argument NOSNARF with a value of `lex' means to return
just the lexical token and not the string."
  (if (not tag) (setq tag (semantic-current-tag)))
  (save-excursion
    ;; Find this tag.
    (semantic-go-to-tag tag)
    (let* ((starttag (semantic-find-tag-by-overlay-prev
		      (semantic-tag-start tag)))
	   (start (if starttag
		      (semantic-tag-end starttag)
		    (point-min))))
      (when (and comment-start-skip
		 (re-search-backward comment-start-skip start t))
	;; We found a comment that doesn't belong to the body
	;; of a function.
	(semantic-doc-snarf-comment-for-tag nosnarf)))
    ))