Function: semantic-refresh-tags-safe
semantic-refresh-tags-safe is a byte-compiled function defined in
semantic.el.gz.
Signature
(semantic-refresh-tags-safe)
Documentation
Refresh the current buffer's tags safely.
Return non-nil if the refresh was successful. Return nil if there is some sort of syntax error preventing a reparse.
Does nothing if the current buffer doesn't need reparsing.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic.el.gz
(defun semantic-refresh-tags-safe ()
"Refresh the current buffer's tags safely.
Return non-nil if the refresh was successful.
Return nil if there is some sort of syntax error preventing a reparse.
Does nothing if the current buffer doesn't need reparsing."
;; These checks actually occur in `semantic-fetch-tags', but if we
;; do them here, then all the bovination hooks are not run, and
;; we save lots of time.
(cond
;; If the buffer was previously marked unparsable,
;; then don't waste our time.
((semantic-parse-tree-unparseable-p)
nil)
;; The parse tree is already ok.
((semantic-parse-tree-up-to-date-p)
t)
(t
(let* ((inhibit-quit nil)
(lexically-safe t)
)
;; Perform the parsing.
(when (semantic-lex-catch-errors safe-refresh
(save-excursion (semantic-fetch-tags))
nil)
;; If we are here, it is because the lexical step failed,
;; probably due to unterminated lists or something like that.
;; We do nothing, and just wait for the next idle timer
;; to go off. In the meantime, remember this, and make sure
;; no other idle services can get executed.
(setq lexically-safe nil))
;; Return if we are lexically safe
lexically-safe))))