Function: speedbar-item-info-tag-helper
speedbar-item-info-tag-helper is a byte-compiled function defined in
speedbar.el.gz.
Signature
(speedbar-item-info-tag-helper)
Documentation
Display info about a tag that is on the current line.
Return nil if not applicable.
Source Code
;; Defined in /usr/src/emacs/lisp/speedbar.el.gz
(defun speedbar-item-info-tag-helper ()
"Display info about a tag that is on the current line.
Return nil if not applicable."
(save-excursion
(beginning-of-line)
(cond
((re-search-forward " [-+=]?> \\([^\n]+\\)" (line-end-position) t)
(let* ((tag (match-string 1))
(attr (speedbar-line-token))
(item nil)
(semantic-tagged (if (fboundp 'semantic-tag-p)
(semantic-tag-p attr))))
(if semantic-tagged
(with-no-warnings
(save-excursion
(when (and (semantic-tag-overlay attr)
(semantic-tag-buffer attr))
(set-buffer (semantic-tag-buffer attr)))
(dframe-message
(funcall semantic-sb-info-format-tag-function attr)
)))
(looking-at "\\([0-9]+\\):")
(setq item (file-name-nondirectory (speedbar-line-directory)))
(dframe-message "Tag: %s in %s" tag item))))
((re-search-forward "{[+-]} \\([^\n]+\\)$" (line-end-position) t)
(dframe-message "Group of tags \"%s\"" (match-string 1)))
((re-search-forward " [+-]?[()|@] \\([^\n]+\\)$" nil t)
(let* ((detailtext (match-string 1))
(detail (or (speedbar-line-token) detailtext))
(parent (save-excursion
(beginning-of-line)
(let ((dep (if (looking-at "[0-9]+:")
(1- (string-to-number (match-string 0)))
0)))
(re-search-backward (concat "^"
(int-to-string dep)
":")
nil t))
(if (looking-at "[0-9]+: +[-+=>]> \\([^\n]+\\)$")
(speedbar-line-token)
nil))))
(cond
((featurep 'semantic)
(with-no-warnings
(if (semantic-tag-p detail)
(dframe-message
(funcall semantic-sb-info-format-tag-function detail parent))
(if parent
(dframe-message "Detail: %s of tag %s" detail
(if (semantic-tag-p parent)
(semantic-format-tag-name parent nil t)
parent))
(dframe-message "Detail: %s" detail)))))
;; Not using `semantic':
(parent
(dframe-message "Detail: %s of tag %s" detail parent))
(t
(dframe-message "Detail: %s" detail))))))))