Function: semantic-sb-fetch-tag-table

semantic-sb-fetch-tag-table is a byte-compiled function defined in sb.el.gz.

Signature

(semantic-sb-fetch-tag-table FILE)

Documentation

Load FILE into a buffer, and generate tags using the Semantic parser.

Returns the tag list, or t for an error.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/sb.el.gz
(defun semantic-sb-fetch-tag-table (file)
  "Load FILE into a buffer, and generate tags using the Semantic parser.
Returns the tag list, or t for an error."
  (let ((out nil))
    (if (and (featurep 'semantic/db)
	     (semanticdb-minor-mode-p)
	     (not speedbar-power-click)
	     ;; If the database is loaded and running, try to get
	     ;; tokens from it.
	     (setq out (semanticdb-file-stream file)))
	;; Successful DB query.
	nil
      ;; No database, do it the old way.
      (with-current-buffer (find-file-noselect file)
	(if (or (not (featurep 'semantic))
		(not semantic--parse-table))
	    (setq out t)
	  (if speedbar-power-click (semantic-clear-toplevel-cache))
	  (setq out (semantic-fetch-tags)))))
    (if (listp out)
	(condition-case nil
	    (progn
	      ;; This brings externally defined methods into
	      ;; their classes, and creates meta classes for
	      ;; orphans.
	      (setq out (semantic-adopt-external-members out))
	      ;; Dump all the tokens into buckets.
	      (semantic-sb-with-tag-buffer (car out)
		(semantic-bucketize out nil
				    (lambda (tagsin)
				      ;; Remove all boring tags.
				      (semantic-filter-tags-by-class
				       semantic-sb-filter-tags-of-class
				       tagsin)))))
	  (error t))
      t)))