Function: semantic-idle-scheduler-refresh-tags
semantic-idle-scheduler-refresh-tags is a byte-compiled function
defined in idle.el.gz.
Signature
(semantic-idle-scheduler-refresh-tags)
Documentation
Refreshes the current buffer's tags.
This is called by semantic-idle-scheduler-function to update the
tags in the current buffer.
Return non-nil if the refresh was successful. Return nil if there is some sort of syntax error preventing a full reparse.
Does nothing if the current buffer doesn't need reparsing.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/idle.el.gz
(defun semantic-idle-scheduler-refresh-tags ()
"Refreshes the current buffer's tags.
This is called by `semantic-idle-scheduler-function' to update the
tags in the current buffer.
Return non-nil if the refresh was successful.
Return nil if there is some sort of syntax error preventing a full
reparse.
Does nothing if the current buffer doesn't need reparsing."
(prog1
;; 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
;; If the buffer might need a reparse and it is safe to do so,
;; give it a try.
(let* (;(semantic-working-type nil)
(inhibit-quit nil)
;; (working-use-echo-area-p
;; (not semantic-idle-scheduler-working-in-modeline-flag))
;; (working-status-dynamic-type
;; (if semantic-idle-scheduler-no-working-message
;; nil
;; working-status-dynamic-type))
;; (working-status-percentage-type
;; (if semantic-idle-scheduler-no-working-message
;; nil
;; working-status-percentage-type))
(lexically-safe t)
)
;; Let people hook into this, but don't let them hose
;; us over!
(condition-case nil
(run-hooks 'semantic-before-idle-scheduler-reparse-hook)
(error (setq semantic-before-idle-scheduler-reparse-hook nil)))
(unwind-protect
;; Perform the parsing.
(progn
(when semantic-idle-scheduler-verbose-flag
(message "IDLE: reparse %s..." (buffer-name)))
(when (semantic-lex-catch-errors idle-scheduler
(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))
(when semantic-idle-scheduler-verbose-flag
(message "IDLE: reparse %s...done" (buffer-name))))
;; Let people hook into this, but don't let them hose
;; us over!
(condition-case nil
(run-hooks 'semantic-after-idle-scheduler-reparse-hook)
(error (setq semantic-after-idle-scheduler-reparse-hook nil))))
;; Return if we are lexically safe (from prog1)
lexically-safe)))
;; After updating the tags, handle any pending decorations for this
;; buffer.
(require 'semantic/decorate/mode)
(semantic-decorate-flush-pending-decorations (current-buffer))
))