Function: semantic-sanity-check
semantic-sanity-check is an interactive and byte-compiled function
defined in util.el.gz.
Signature
(semantic-sanity-check &optional CACHE OVER NOTFIRST)
Documentation
Perform a sanity check on the current buffer.
The buffer's set of overlays, and those overlays found via the cache are verified against each other. CACHE, and OVER are the semantic cache, and the overlay list. NOTFIRST indicates that this was not the first call in the recursive use.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/util.el.gz
(defun semantic-sanity-check (&optional cache over notfirst)
"Perform a sanity check on the current buffer.
The buffer's set of overlays, and those overlays found via the cache
are verified against each other.
CACHE, and OVER are the semantic cache, and the overlay list.
NOTFIRST indicates that this was not the first call in the recursive use."
(interactive)
(if (and (not cache) (not over) (not notfirst))
(setq cache semantic--buffer-cache
over (overlays-in (point-min) (point-max))))
(while cache
(let ((chil (semantic-tag-components-with-overlays (car cache))))
(if (not (memq (semantic-tag-overlay (car cache)) over))
(message "Tag %s not in buffer overlay list."
(semantic-format-tag-concise-prototype (car cache))))
(setq over (delq (semantic-tag-overlay (car cache)) over))
(setq over (semantic-sanity-check chil over t))
(setq cache (cdr cache))))
(if (not notfirst)
;; Strip out all overlays which aren't semantic overlays
(let ((o nil))
(while over
(when (and (overlay-get (car over) 'semantic)
(not (eq (overlay-get (car over) 'semantic)
'unmatched)))
(setq o (cons (car over) o)))
(setq over (cdr over)))
(when (called-interactively-p 'any)
(message "Remaining overlays: %S" o))))
over)