Function: semantic-c-reset-preprocessor-symbol-map
semantic-c-reset-preprocessor-symbol-map is a byte-compiled function
defined in c.el.gz.
Signature
(semantic-c-reset-preprocessor-symbol-map)
Documentation
Reset the C preprocessor symbol map based on all input variables.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/bovine/c.el.gz
(defun semantic-c-reset-preprocessor-symbol-map ()
"Reset the C preprocessor symbol map based on all input variables."
(when (and semantic-mode
(featurep 'semantic/bovine/c))
(remove-hook 'mode-local-init-hook
#'semantic-c-reset-preprocessor-symbol-map)
;; Initialize semantic-lex-spp-macro-symbol-obarray with symbols.
(setq-mode-local c-mode
semantic-lex-spp-macro-symbol-obarray
(semantic-lex-make-spp-table
(append semantic-lex-c-preprocessor-symbol-map-builtin
semantic-lex-c-preprocessor-symbol-map)))
(let ((filemap nil)
)
(when (and (not semantic-c-in-reset-preprocessor-table)
(featurep 'semantic/db-mode)
(semanticdb-minor-mode-p))
(let ( ;; Don't use external parsers. We need the internal one.
(semanticdb-out-of-buffer-create-table-fcn nil)
;; Don't recurse while parsing these files the first time.
(semantic-c-in-reset-preprocessor-table t)
)
(dolist (sf semantic-lex-c-preprocessor-symbol-file)
;; Global map entries
(let* ((table (semanticdb-file-table-object sf t)))
(when table
(when (semanticdb-needs-refresh-p table)
(condition-case nil
;; Call with FORCE, as the file is very likely to
;; not be in a buffer.
(semanticdb-refresh-table table t)
(error (message "Error updating tables for %S"
(eieio-object-name table)))))
(setq filemap (append filemap (oref table lexical-table)))
)))))
;; Update symbol obarray
(setq-mode-local c-mode
semantic-lex-spp-macro-symbol-obarray
(semantic-lex-make-spp-table
(append semantic-lex-c-preprocessor-symbol-map-builtin
semantic-lex-c-preprocessor-symbol-map
filemap))))))