Function: senator-search-tag-name
senator-search-tag-name is a byte-compiled function defined in
senator.el.gz.
Signature
(senator-search-tag-name TAG)
Documentation
Search for TAG name in current buffer.
Limit the search to TAG bounds. If found, set point to the end of the name, and return point. The beginning of the name is at (match-beginning 0). Return nil if not found, that is if TAG name doesn't come from the source.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/senator.el.gz
;;; Search functions
(defun senator-search-tag-name (tag)
"Search for TAG name in current buffer.
Limit the search to TAG bounds.
If found, set point to the end of the name, and return point. The
beginning of the name is at (match-beginning 0).
Return nil if not found, that is if TAG name doesn't come from the
source."
(let ((name (semantic-tag-name tag)))
(setq name (if (string-match "\\`\\([^[]+\\)[[]" name)
(match-string 1 name)
name))
(goto-char (semantic-tag-start tag))
(when (re-search-forward (concat
;; The tag name is expected to be
;; between word delimiters, whitespace,
;; or punctuation.
"\\(\\<\\|\\s-+\\|\\s.\\)"
(regexp-quote name)
"\\(\\>\\|\\s-+\\|\\s.\\)")
(semantic-tag-end tag)
t)
(goto-char (match-beginning 0))
(search-forward name))))