Function: semantic-symref-test-count-hits-in-tag

semantic-symref-test-count-hits-in-tag is an interactive and byte-compiled function defined in filter.el.gz.

Signature

(semantic-symref-test-count-hits-in-tag)

Documentation

Lookup in the current tag the symbol under point.

the count all the other references to the same symbol within the tag that contains point, and return that.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/symref/filter.el.gz
(defun semantic-symref-test-count-hits-in-tag ()
  "Lookup in the current tag the symbol under point.
the count all the other references to the same symbol within the
tag that contains point, and return that."
  (interactive)
  (let* ((ctxt (semantic-analyze-current-context))
	 (target (car (reverse (oref ctxt prefix))))
	 (tag (semantic-current-tag))
	 (start (current-time))
	 (Lcount 0))
    (when (semantic-tag-p target)
      (semantic-symref-hits-in-region
       target (lambda (_start _end _prefix) (setq Lcount (1+ Lcount)))
       (semantic-tag-start tag)
       (semantic-tag-end tag))
      (when (called-interactively-p 'interactive)
	(message "Found %d occurrences of %s in %.2f seconds"
		 Lcount (semantic-tag-name target)
		 (semantic-elapsed-time start nil)))
      Lcount)))