Function: semantic-decoration-on-includes-highlight-default
semantic-decoration-on-includes-highlight-default is an autoloaded and
byte-compiled function defined in include.el.gz.
Signature
(semantic-decoration-on-includes-highlight-default TAG)
Documentation
Highlight the include TAG to show that semantic can't find it.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/decorate/include.el.gz
(defun semantic-decoration-on-includes-highlight-default (tag)
"Highlight the include TAG to show that semantic can't find it."
(let* ((file (semantic-dependency-tag-file tag))
;; Don't actually load includes
(semanticdb-find-default-throttle
(remq 'unloaded semanticdb-find-default-throttle))
(table (semanticdb-find-table-for-include tag (current-buffer)))
(face nil)
(map nil)
)
(cond
((and (not file) (not table))
;; Cannot find this header.
(setq face 'semantic-decoration-on-unknown-includes
map semantic-decoration-on-unknown-include-map)
)
((and (not file) table)
;; There is no file, but the language supports a table for this
;; include. Import perhaps? System include with no file?
(setq face 'semantic-decoration-on-fileless-includes
map semantic-decoration-on-fileless-include-map)
)
((and table (number-or-marker-p (oref table pointmax)))
;; A found and parsed file.
(setq face 'semantic-decoration-on-includes
map semantic-decoration-on-include-map)
)
(t
;; An unparsed file.
(setq face 'semantic-decoration-on-unparsed-includes
map semantic-decoration-on-unparsed-include-map)
(when table
;; Set ourselves up for synchronization
(semanticdb-cache-get
table 'semantic-decoration-unparsed-include-cache)
;; Add a dependency.
(let ((currenttable semanticdb-current-table))
(semanticdb-add-reference currenttable tag))
)
))
;; @TODO - if not a tag with a position, we need to get one. How?
(when (semantic-tag-with-position-p tag)
(let ((ol (semantic-decorate-tag tag
(semantic-tag-start tag)
(semantic-tag-end tag)
face)))
(overlay-put ol 'mouse-face 'highlight)
(overlay-put ol 'keymap map)
(overlay-put ol 'help-echo "Header File : mouse-3 - Context menu")))))