From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Eglen Newsgroups: gmane.emacs.devel Subject: change-log-goto-source: recognising . within tag names Date: Fri, 20 Mar 2009 10:22:42 +0000 Message-ID: <20806.1237544562@maps> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1237544632 30463 80.91.229.12 (20 Mar 2009 10:23:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Mar 2009 10:23:52 +0000 (UTC) Cc: Stephen Eglen To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 20 11:25:09 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lkbtm-0007II-RX for ged-emacs-devel@m.gmane.org; Fri, 20 Mar 2009 11:24:23 +0100 Original-Received: from localhost ([127.0.0.1]:41065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkbsQ-00015L-6m for ged-emacs-devel@m.gmane.org; Fri, 20 Mar 2009 06:22:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LkbsK-00014z-M7 for emacs-devel@gnu.org; Fri, 20 Mar 2009 06:22:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LkbsF-00014V-Ls for emacs-devel@gnu.org; Fri, 20 Mar 2009 06:22:51 -0400 Original-Received: from [199.232.76.173] (port=43434 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkbsF-00014S-FT for emacs-devel@gnu.org; Fri, 20 Mar 2009 06:22:47 -0400 Original-Received: from ppsw-0.csi.cam.ac.uk ([131.111.8.130]:35281) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LkbsF-0001Jn-6q for emacs-devel@gnu.org; Fri, 20 Mar 2009 06:22:47 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Original-Received: from lapc-br1-101.maths.private.cam.ac.uk ([172.16.218.101]:46547 helo=maps) by ppsw-0.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.130]:25) with esmtp id 1LkbsD-00039K-2b (Exim 4.70) (return-path ); Fri, 20 Mar 2009 10:22:45 +0000 Original-Received: from stephen (helo=maps) by maps with local-esmtp (Exim 4.69) (envelope-from ) id 1LkbsA-0005Pb-1M; Fri, 20 Mar 2009 10:22:42 +0000 X-Mailer: MH-E 8.1; nmh 1.2; GNU Emacs 23.0.91 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109713 Archived-At: 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 * 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