Function: semantic-file-tag-table

semantic-file-tag-table is a byte-compiled function defined in util.el.gz.

Signature

(semantic-file-tag-table FILE)

Documentation

Return a tag table for FILE.

If it is loaded, return the stream after making sure it's ok. If FILE is not loaded, check to see if semanticdb feature exists,
   and use it to get tags from files not in memory.
If FILE is not loaded, and semanticdb is not available, find the file
   and parse it.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/util.el.gz
;; These semanticdb calls will throw warnings in the byte compiler.
;; Doing the right thing to make them available at compile time
;; really messes up the compilation sequence.
(defun semantic-file-tag-table (file)
  "Return a tag table for FILE.
If it is loaded, return the stream after making sure it's ok.
If FILE is not loaded, check to see if `semanticdb' feature exists,
   and use it to get tags from files not in memory.
If FILE is not loaded, and semanticdb is not available, find the file
   and parse it."
  (save-match-data
    (if (find-buffer-visiting file)
	(with-current-buffer (find-buffer-visiting file)
	  (semantic-fetch-tags))
      ;; File not loaded
      (if (and (require 'semantic/db-mode)
	       (semanticdb-minor-mode-p))
	  ;; semanticdb is around, use it.
	  (semanticdb-file-stream file)
	;; Get the stream ourselves.
	(with-current-buffer (find-file-noselect file)
	  (semantic-fetch-tags))))))