Function: semanticdb-create-table-for-file-not-in-buffer
semanticdb-create-table-for-file-not-in-buffer is a byte-compiled
function defined in db.el.gz.
Signature
(semanticdb-create-table-for-file-not-in-buffer FILENAME)
Documentation
Create a table for the file FILENAME.
If there are no language specific configurations, this function will read in the buffer, parse it, and kill the buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/db.el.gz
(defun semanticdb-create-table-for-file-not-in-buffer (filename)
"Create a table for the file FILENAME.
If there are no language specific configurations, this
function will read in the buffer, parse it, and kill the buffer."
(if (and semanticdb-out-of-buffer-create-table-fcn
(not (file-remote-p filename)))
;; Use external parser only of the file is accessible to the
;; local file system.
(funcall semanticdb-out-of-buffer-create-table-fcn filename)
(save-excursion
(let* ( ;; Remember the buffer to kill
(kill-buffer-flag (find-buffer-visiting filename))
(buffer-to-kill (or kill-buffer-flag
(semantic-find-file-noselect filename t))))
;; This shouldn't ever be set. Debug some issue here?
;; (when kill-buffer-flag (debug))
(set-buffer buffer-to-kill)
;; Find file should automatically do this for us.
;; Sometimes the DB table doesn't contains tags and needs
;; a refresh. For example, when the file is loaded for
;; the first time, and the idle scheduler didn't get a
;; chance to trigger a parse before the file buffer is
;; killed.
(when semanticdb-current-table
(semantic-fetch-tags))
(prog1
semanticdb-current-table
(when (not kill-buffer-flag)
;; If we had to find the file, then we should kill it
;; to keep the master buffer list clean.
(kill-buffer buffer-to-kill)
)))))
)