help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tags, yet again


From: Kevin Rodgers
Subject: Re: tags, yet again
Date: Tue, 30 Aug 2005 10:49:12 -0600
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Ian Zimmerman wrote:
> Does anyone actually understand the algorithm for selecting a location
> to jump to with Alt-. ?
>
> The documentation for find-tag-noselect says:
> When there are multiple matches for a tag, more exact matches are found first.

The source for find-tag-noselect says:

           ;; find-tag-in-order does the real work.

And the source for find-tag-in-order says:

;; Internal tag finding function.

;; PATTERN is a string to pass to second arg SEARCH-FORWARD-FUNC, and to
;; any member of the function list ORDER (third arg).  If ORDER is nil,
;; use saved state to continue a previous search.

;; Fourth arg MATCHING is a string, an English '-ing' word, to be used in
;; an error message.

;; Fifth arg NEXT-LINE-AFTER-FAILURE-P is non-nil if after a failed match,
;; point should be moved to the next line.

;; Algorithm is as follows.  For each qualifier-func in ORDER, go to
;; beginning of tags file, and perform inner loop: for each naive match for
;; PATTERN found using SEARCH-FORWARD-FUNC, qualify the naive match using
;; qualifier-func.  If it qualifies, go to the specified line in the
;; specified source file and return.  Qualified matches are remembered to
;; avoid repetition.  State is saved so that the loop can be continued.

> But, I've frequently seen Alt-. to jump to a differently capitalized version > of the symbol under point first, even when there's an exact match available.

,----[ C-h v tags-case-fold-search RET ]
| tags-case-fold-search's value is default
|
| Documentation:
| *Whether tags operations should be case-sensitive.
| A value of t means case-insensitive, a value of nil means case-sensitive.
| Any other value means use the setting of `case-fold-search'.
|
| You can customize this variable.
|
| Defined in `etags'.
`----

--
Kevin Rodgers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]