From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Francesco Potorti` Newsgroups: gmane.emacs.devel Subject: Re: tags completion bug Date: Wed, 25 Sep 2002 12:53:56 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1032951441 11687 127.0.0.1 (25 Sep 2002 10:57:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 25 Sep 2002 10:57:21 +0000 (UTC) Cc: Emacs developers Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17u9r6-00032M-00 for ; Wed, 25 Sep 2002 12:57:20 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17uAYJ-0007EU-00 for ; Wed, 25 Sep 2002 13:42:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17u9r1-0004HB-00; Wed, 25 Sep 2002 06:57:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17u9o9-0003vy-00 for emacs-devel@gnu.org; Wed, 25 Sep 2002 06:54:17 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17u9o6-0003tc-00 for emacs-devel@gnu.org; Wed, 25 Sep 2002 06:54:17 -0400 Original-Received: from pot.cnuce.cnr.it ([146.48.83.182]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17u9o0-0003ln-00; Wed, 25 Sep 2002 06:54:08 -0400 Original-Received: from pot by pot.cnuce.cnr.it with local (Exim 3.35 #1 (Debian)) id 17u9no-00038x-00; Wed, 25 Sep 2002 12:53:56 +0200 Original-To: roland@gnu.org, gerd@gnu.org In-reply-to: (rms@gnu.org) X-fingerprint: 4B2 6187 5C3 D6B1 2E31 7666 9DF 2DC9 BE21 6115 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8159 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8159 Hi Roland, hi Gerd, I see that in etags-tags-completion-table you added the characters "+*:?" as legitimate in an identifier. Stefan Monnier on emacs-devel pointed out that the asterisk is used in Common Lisp. What are the other characters for? I'd like to write this info in a comment inside the function. Also, would it be reasonable to use \(\sw\|\s_\), instead of the bracketed lists of characters? (defun etags-tags-completion-table () (let ((table (make-vector 511 0))) (save-excursion (goto-char (point-min)) ;; This monster regexp matches an etags tag line. ;; \1 is the string to match; ;; \2 is not interesting; ;; \3 is the guessed tag name; XXX guess should be better eg DEFUN ;; \4 is not interesting; ;; \5 is the explicitly-specified tag name. ;; \6 is the line to start searching at; ;; \7 is the char to start searching at. (while (re-search-forward "^\\(\\([^\177]+[^-a-zA-Z0-9_+*$:\177]+\\)?\ \\([-a-zA-Z0-9_+*$?:]+\\)[^-a-zA-Z0-9_+*$?:\177]*\\)\177\ \\(\\([^\n\001]+\\)\001\\)?\\([0-9]+\\)?,\\([0-9]+\\)?\n" nil t) (intern (if (match-beginning 5) ;; There is an explicit tag name. (buffer-substring (match-beginning 5) (match-end 5)) ;; No explicit tag name. Best guess. (buffer-substring (match-beginning 3) (match-end 3))) table))) table))