Function: etags-tags-apropos
etags-tags-apropos is a byte-compiled function defined in etags.el.gz.
Signature
(etags-tags-apropos STRING)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/etags.el.gz
(defun etags-tags-apropos (string) ; Doc string?
(when tags-apropos-verbose
(princ (substitute-command-keys "Tags in file `"))
(tags-with-face 'highlight (princ buffer-file-name))
(princ (substitute-command-keys "':\n\n")))
(goto-char (point-min))
(let ((progress-reporter (make-progress-reporter
(format-message
"Making tags apropos buffer for `%s'..." string)
(point-min) (point-max))))
(while (re-search-forward string nil t)
(progress-reporter-update progress-reporter (point))
(beginning-of-line)
(let* ( ;; Get the local value in the tags table
;; buffer before switching buffers.
(goto-func goto-tag-location-function)
(tag-info (save-excursion (funcall snarf-tag-function)))
(tag (if (eq t (car tag-info)) nil (car tag-info)))
(file-path (save-excursion (if tag (file-of-tag)
(save-excursion (forward-line 1)
(file-of-tag)))))
(file-label (if tag (file-of-tag t)
(save-excursion (forward-line 1)
(file-of-tag t))))
(pt (with-current-buffer standard-output (point))))
(if tag
(progn
(princ (format "[%s]: " file-label))
(princ tag)
(when (= (aref tag 0) ?\() (princ " ...)"))
(with-current-buffer standard-output
(make-text-button pt (point)
'tag-info tag-info
'file-path file-path
'goto-func goto-func
'action (lambda (button)
(let ((tag-info (button-get button 'tag-info))
(goto-func (button-get button 'goto-func)))
(tag-find-file-of-tag (button-get button 'file-path))
(widen)
(funcall goto-func tag-info)))
'follow-link t
'face tags-tag-face
'type 'button)))
(princ (format "- %s" file-label))
(with-current-buffer standard-output
(make-text-button pt (point)
'file-path file-path
'action (lambda (button)
(tag-find-file-of-tag (button-get button 'file-path))
;; Get the local value in the tags table
;; buffer before switching buffers.
(goto-char (point-min)))
'follow-link t
'face tags-tag-face
'type 'button))))
(terpri)
(forward-line 1))
(message nil))
(when tags-apropos-verbose (princ "\n")))