Variable: global-semantic-idle-local-symbol-highlight-mode-hook
global-semantic-idle-local-symbol-highlight-mode-hook is a
customizable variable defined in idle.el.gz.
Value
nil
Documentation
Hook run after entering or leaving global-semantic-idle-local-symbol-highlight-mode(var)/global-semantic-idle-local-symbol-highlight-mode(fun).
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/idle.el.gz
(define-semantic-idle-service semantic-idle-local-symbol-highlight
"Highlight the tag and symbol references of the symbol under point.
Call `semantic-analyze-current-context' to find the reference tag.
Call `semantic-symref-hits-in-region' to identify local references."
(require 'pulse)
(when (semantic-idle-summary-useful-context-p)
(let* ((ctxt
(semanticdb-without-unloaded-file-searches
(semantic-analyze-current-context)))
(Hbounds (when ctxt (oref ctxt bounds)))
(target (when ctxt (car (reverse (oref ctxt prefix)))))
(tag (semantic-current-tag))
;; We use pulse, but we don't want the flashy version,
;; just the stable version.
(pulse-flag nil))
(when (and ctxt tag)
;; Highlight the original tag? Protect against problems.
(condition-case nil
(semantic-idle-symbol-maybe-highlight target)
(error nil))
;; Identify all hits in this current tag.
(when (semantic-tag-p target)
(require 'semantic/symref/filter)
(semantic-symref-hits-in-region
target (lambda (start end _prefix)
(when (/= start (car Hbounds))
(pulse-momentary-highlight-region
start end semantic-idle-symbol-highlight-face))
(semantic-throw-on-input 'symref-highlight)
)
(semantic-tag-start tag)
(semantic-tag-end tag)))
))))