all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* change-log-goto-source: recognising . within tag names
@ 2009-03-20 10:22 Stephen Eglen
  2009-03-20 19:48 ` martin rudalics
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Eglen @ 2009-03-20 10:22 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stephen Eglen


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

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

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

with the corresponding Changelog

2009-03-20  Stephen Eglen  <stephen@gnu.org>

	* 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




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-22  9:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-20 10:22 change-log-goto-source: recognising . within tag names Stephen Eglen
2009-03-20 19:48 ` martin rudalics
2009-03-22  2:49   ` Bob Rogers
2009-03-22  9:10     ` martin rudalics

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.