unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk>
Cc: emacs-devel@gnu.org
Subject: Re: change-log-goto-source: recognising . within tag names
Date: Fri, 20 Mar 2009 20:48:47 +0100	[thread overview]
Message-ID: <49C3F31F.6090902@gmx.at> (raw)
In-Reply-To: <20806.1237544562@maps>

 > change-log-goto-source is a great function for finding the definition of
 > a function mentioned in a changelog.  I'm looking for some help though
 > getting it to work recognising tags in the language R (a popular
 > statistics environment).  In R, function names are often include the
 > period character, e.g. t.test().  When using change-log-goto-source on
 > these kinds of tags, the correct tag is not found because . is of the
 > syntax class 'punctuation', and it looks to me like the tags must be made
 > of  elements of syntax class 'word'.

`word' or `symbol'.

 > How to fix this?  I tried changing the regexp, but this didn't work:
 >
 > (defconst change-log-tag-re
 >   "(\\(\\(?:\\sw\\|\\s_\\|\\.\\)+\\(?:[, \t]+\\(?:\\sw\\|\\s_\\|\\.\\)+\\)*\\))"
 >   "Regexp matching a tag name in change log entries.")

This won't be sufficient because `find-tag-default' (which is called by
`change-log-search-tag-name-1') also works on symbols only and
`change-log-mode' is derived from `text-mode' :-(

I'm afraid `change-log-search-tag-name' is too clever when trying to
find a suitable tag.  Usually, it seems sufficient to search for the
previous and next property change of the `change-log-list' text property
near `point' and return the corresponding string.  Maybe we should
provide a `change-log-search-tag-name-function' people could set to do
the job.  Or, simply set the `syntax-table' text property to `symbol'
for periods preceded _and_ followed by word/symbol characters.

martin





  reply	other threads:[~2009-03-20 19:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-20 10:22 change-log-goto-source: recognising . within tag names Stephen Eglen
2009-03-20 19:48 ` martin rudalics [this message]
2009-03-22  2:49   ` Bob Rogers
2009-03-22  9:10     ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49C3F31F.6090902@gmx.at \
    --to=rudalics@gmx.at \
    --cc=S.J.Eglen@damtp.cam.ac.uk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).