Here's a bug:
Go to the XEmacs source tree; make TAGS;
M-x find-tag RET write-region-internal RET
M-x find-tag RET write-region RET ;; it won't find it...
Keep searching using
M-x tags-loop-continue ;; will never find write-region
find-tag-internal has this horrible code
;; \_ in the tagname is used to indicate a symbol boundary.
(setq exact-tagname (format "\C-?\\_%s\\_\C-a\\|\\_%s\\_" tagname tagname))
(while (string-match "\\\\_" exact-tagname)
(aset exact-tagname (1- (match-end 0)) ?b))
Huh? It's creating a string full of "\_", only to replace them with
"\b"??
So the search string will end up being
"\\bwrite-region\\b\\|\\bwrite-region\\b"
Huh????
Even if that was what we wanted, how is that pattern different from
"\\bwrite-region\\b"
??
I feel this urge coming on to delete our version of etags.el. The FSF
version couldn't be this bad..... Hmmm - OK, I retract that last remark...
Here's what I want:
First, look through all the tags tables for the STRING (not regexp)
"^?write-region^A"
That can't be too hard. It could even fit into the current framework
if we regexp-quote "write-region".
Then look through all the tags tables for the REGEXP
"\_write-region\_". Now here's the tricky part - I want the syntax
table to be used for the search to depend on the file being searched.
So if we have in the TAGS table:
lisp/code-files.el,1445
(defun insert-file-contentsinsert-file-contents360,14517
(defvar write-region-pre-hookwrite-region-pre-hook464,18379
(defvar write-region-post-hookwrite-region-post-hook484,19203
(defun write-regionwrite-region491,19492
Then I'd like the emacs-lisp-mode syntax table used for the tags found
in code-files.el. OK, that might be hard. I'll live without THAT
feature. Or I could live with the lesser feature of having special
syntax support for C and elisp.
Anyways, we look for "\_write-region\_", using some appropriate syntax
table.
Then we search all tags tables for the regexp "write-region".
Maybe we should search somewhere along the way for the regexp
"^?.*write-region.*^A"
which will find substrings of exact matches.
Kyle and Hrvoje, you've been maintaining this file. Christoph, you've
wanted to replace our version with an improved one. And I will fix
this if no one else is willing to. Who will do it? Warning: if I end
up doing this, it might be a long detour.
Oh, I should mention that I have
(defconst tags-build-completion-table nil)
Martin