Function: semanticdb-enable-gnu-global-databases
semanticdb-enable-gnu-global-databases is an autoloaded, interactive
and byte-compiled function defined in db-global.el.gz.
Signature
(semanticdb-enable-gnu-global-databases MODE &optional NOERROR)
Documentation
Enable the use of the GNU Global SemanticDB back end for all files of MODE.
This will add an instance of a GNU Global database to each buffer in a GNU Global supported hierarchy.
Two sanity checks are performed to assure (a) that GNU global program exists and (b) that the GNU global program version is compatibility with the database version. If optional NOERROR is nil, then an error may be signaled on version mismatch. If NOERROR is not nil, then no error will be signaled. Instead return value will indicate success or failure with non-nil or nil respective values.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/db-global.el.gz
;;;###autoload
(defun semanticdb-enable-gnu-global-databases (mode &optional noerror)
"Enable the use of the GNU Global SemanticDB back end for all files of MODE.
This will add an instance of a GNU Global database to each buffer
in a GNU Global supported hierarchy.
Two sanity checks are performed to assure (a) that GNU global program exists
and (b) that the GNU global program version is compatibility with the database
version. If optional NOERROR is nil, then an error may be signaled on version
mismatch. If NOERROR is not nil, then no error will be signaled. Instead
return value will indicate success or failure with non-nil or nil respective
values."
(interactive
(list (completing-read
"Enable in Mode: " obarray
(lambda (s) (get s 'mode-local-symbol-table))
t (symbol-name major-mode))))
;; First, make sure the version is ok.
(if (not (cedet-gnu-global-version-check noerror))
nil
;; Make sure mode is a symbol.
(when (stringp mode)
(setq mode (intern mode)))
(let ((semanticdb--ih (mode-local-value mode 'semantic-init-mode-hook)))
(eval `(setq-mode-local
,mode semantic-init-mode-hook
(cons 'semanticdb-enable-gnu-global-hook ',semanticdb--ih))
t))
t
)
)