[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tags completion bug
From: |
Francesco Potorti` |
Subject: |
Re: tags completion bug |
Date: |
Wed, 25 Sep 2002 12:53:56 +0200 |
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))