Function: global-semantic-idle-local-symbol-highlight-mode

global-semantic-idle-local-symbol-highlight-mode is an autoloaded, interactive and byte-compiled function defined in idle.el.gz.

Signature

(global-semantic-idle-local-symbol-highlight-mode &optional ARG)

Documentation

Toggle global-semantic-idle-local-symbol-highlight-mode.

With ARG, turn the minor mode on if ARG is positive, off otherwise.

When this minor mode is enabled, semantic-idle-local-symbol-highlight-mode(var)/semantic-idle-local-symbol-highlight-mode(fun) is turned on in every Semantic-supported buffer.

Key Bindings

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)))
	))))