Article View: gnu.emacs.bug
Article #99778Bug? in file-of-tag
From: cire|eric
Date: Tue, 19 Jun 1990 05:12
Date: Tue, 19 Jun 1990 05:12
32 lines
1678 bytes
1678 bytes
file-of-tag uses the size field on the first line of the file entry
in the tags file. This size field is in chars.
If the TAGS file is edited by hand file-of-tag will screw up
horrible and find random file names. This operation, the hand
editing, is common for large software systems where it takes
an appreciable amount of time to rebuild the TAGS file.
If files are always seperated by ^L characters (I believe this is
true), the following replacement for file-of-tag will always do
the right thing. It is simpler too.
I'd like to suggest that this version of file-of-tag replace what
is in the distribution.
(defun file-of-tag ()
"Return the file name of the file whose tags point is within.
Assumes the tag table is the current buffer.
File name returned is relative to tag table file's directory."
(save-excursion
(if (not (re-search-backward "^\C-L" nil t))
(error "%s is a corrupt tags file" tags-file-name))
(forward-line 1)
(skip-chars-forward "^,\n")
(buffer-substring (point)
(progn (beginning-of-line) (point)))))
-c
cire@cisco.com
Technical Details
Message-ID:
<9006190512.AA08552@life.ai.mit.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!decwrl!ucbvax!tut.cis.ohio-state.edu!CISCO.COM!cireShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,8d20fbc2e89f216b,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-06-18 22:12:14 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!decwrl!ucbvax!tut.cis.ohio-state.edu!CISCO.COM!cire From: cire@CISCO.COM (cire|eric) Newsgroups: gnu.emacs.bug Subject: Bug? in file-of-tag Message-ID: <9006190512.AA08552@life.ai.mit.edu> Date: 19 Jun 90 05:12:14 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 32 Posted: Tue Jun 19 06:12:14 1990