Function: semantic-symref-hits-in-region
semantic-symref-hits-in-region is a byte-compiled function defined in
filter.el.gz.
Signature
(semantic-symref-hits-in-region TARGET HOOKFCN START END)
Documentation
Find all occurrences of the symbol TARGET that match TARGET the tag.
For each match, call HOOKFCN.
HOOKFCN takes three arguments that match
semantic-analyze-current-symbols use of HOOKFCN.
( START END PREFIX )
Search occurs in the current buffer between START and END.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/symref/filter.el.gz
;;; IN-BUFFER FILTERING
;; The following does filtering in-buffer only, and not against
;; a symref results object.
(defun semantic-symref-hits-in-region (target hookfcn start end)
"Find all occurrences of the symbol TARGET that match TARGET the tag.
For each match, call HOOKFCN.
HOOKFCN takes three arguments that match
`semantic-analyze-current-symbol's use of HOOKFCN.
( START END PREFIX )
Search occurs in the current buffer between START and END."
(require 'semantic/idle)
(save-excursion
(goto-char start)
(let* ((str (semantic-tag-name target))
(case-fold-search semantic-case-fold)
(regexp (concat "\\<" (regexp-quote str) "\\>")))
(while (re-search-forward regexp end t)
(when (semantic-idle-summary-useful-context-p)
(semantic-analyze-current-symbol
(lambda (start end prefix)
(let ((tag (car (nreverse prefix))))
;; check for semantic match on the text match.
(when (and (semantic-tag-p tag)
(semantic-equivalent-tag-p target tag))
(save-excursion
(funcall hookfcn start end prefix)))))
(point)))))))