[Top][All Lists]

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

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

From: Stephen Eglen
Subject: change-log-goto-source: recognising . within tag names
Date: Fri, 20 Mar 2009 10:22:42 +0000

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'.

This is also a problem in lisp, as it seems . can be used within lisp
defuns (but not used in practice I think):

(defun test1 (x)
  "Test version 1."

(defun test.2 (x)
  "Test version 2."

(defun test3 (x)
  "Test version 3."

with the corresponding Changelog

2009-03-20  Stephen Eglen  <address@hidden>

        * simple.el (test1): New function.
        (test.2): new function.
        (test3): new function.

C-c C-c works when point is on test1 and test3, but not test2.

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.")

Apart from lisp and R, I'm not sure which other languages use . in
function names.

best wishes, Stephen

reply via email to

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