I think that it is supposed to find partial names since it is a
utility for other types of search, like word-searh, though I'm not
positive. Hopefully David Ponce can provide some insight.
>>> Raul Acevedo <raul@...> seems to think that:
>While using JDEE to develop Java code in Emacs, I found a bug in
>senator-search-tag-name. Finding the definition of the following symbol
>from another class fails:
> FooBar foo;
>It fails in senator-search-tag-name, because it neglects to add "\\>" to
>the end of the regexp it uses. So instead of finding foo, it finds
>FooBar. Adding "\\>" to the regexp fixes it:
>(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
> (let ((name (semantic-tag-name tag)))
> (setq name (if (string-match "\\`\\([^+\\)[" name)
> (match-string 1 name)
> (goto-char (semantic-tag-start tag))
> (when (re-search-forward (concat
> ;; the tag name is expected at the
> ;; beginning of a word or after a
> ;; whitespace or a punctuation
> (regexp-quote name) "\\>")
> (semantic-tag-end tag)
> (goto-char (match-beginning 0))
> (search-forward name))))
[ ... ]
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org