[Top][All Lists]

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

Re: change-log-goto-source: recognising . within tag names

From: martin rudalics
Subject: Re: change-log-goto-source: recognising . within tag names
Date: Sun, 22 Mar 2009 10:10:11 +0100
User-agent: Thunderbird (Windows/20080708)

> A simple fix would be to find the file name first, read it into a buffer
> (since we'll need it anyway), and then use its syntax table to parse the
> tag name.  The code below is a start at this; it seems to work.  But it
> would have to be integrated with the change-log-goto-source logic that
> finds both the file at point and the file near the tag and then picks
> the best one.  The logic seems rather obscure; I suspect I would break
> it if I tried to change it.  ;-}

Because I look for the nearest tag first and "the file matching the tag"
afterwards.  The idea behind that logic was to do something reasonable
regardless of the current position of `point' within a ChangeLog entry.
As mentioned earlier that's far too clever.  Users _should_ care a bit
about from where they want to invoke that function.  I think it would be
better to make `change-log-list' entries mousable and and provide the
goto-source facility iff `point' is on such an entry.  In that case your
"use the syntax-table of the source file approach" would fit perfectly.

>    For Lisp in particular, the problem is actually fairly broad, as
> people often use "+", "*", "$", "%", etc., to distinguish certain
> definition names.  A better solution might be to ask the language mode
> itself to do the name parsing, in order to handle such things as name
> quoting conventions.  But, of course, that's a much bigger job.

It's less the question of a "bigger job" but that of providing some
standard interface for language modes.  That is, I pass you a string (or
a narrowed buffer region) and you tell me all identifier names you can
find in it.


reply via email to

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