(provide (quote tags)) (defvar tag-table-files nil "\ List of file names covered by current tag table. nil means it has not been computed yet; do (tag-table-files) to compute it.") (defvar last-tag nil "\ Tag found by the last find-tag.") (defun visit-tags-table (file) "\ Tell tags commands to use tag table file FILE. FILE should be the name of a file created with the `etags' program. A directory name is ok too; it means file TAGS in that directory." (interactive (byte-code "P$C" [default-directory t read-file-name "Visit tags table: (default TAGS) " "TAGS"] 5)) (byte-code "Ĉ ! ! P " [default-directory t file tag-table-files nil tags-file-name expand-file-name file-directory-p "TAGS"] 4)) (defun visit-tags-table-buffer nil "\ Select the buffer containing the current tag table. This is a file whose name is in the variable tags-file-name." (byte-code " !! !q!!- !- \"f=9 \"" [tags-file-name tag-table-files nil t call-interactively visit-tags-table get-file-buffer find-file-noselect verify-visited-file-modtime yes-or-no-p "Tags file has changed, read new contents? " revert-buffer 1 12 error "File %s not a valid tag table"] 10)) (defun file-of-tag nil "\ 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." (byte-code "`eb`W3 ! !`p! b! ! Sb` `\")+" [opoint prev size nil forward-line 1 end-of-line skip-chars-backward "^, " read forward-char buffer-substring beginning-of-line] 10)) (defun tag-table-files nil "\ Return a list of files in the current tag table. File names returned are absolute." (byte-code " P ebm?I ! !`p! b`S `)\"!\" B!! !))" [tag-table-files files prev size tags-file-name visit-tags-table-buffer nil forward-line 1 end-of-line skip-chars-backward "^, " read expand-file-name buffer-substring beginning-of-line file-name-directory forward-char nreverse] 14)) (defun find-tag-default nil (byte-code "! ! #4 !`!!. !! `\"5 )" [nil t looking-at "\\sw\\|\\s_" forward-char 1 re-search-backward buffer-substring forward-sexp -1 "\\s'"] 11)) (defun find-tag-tag (string) (byte-code " # ! \" C*" [default spec string find-tag-default read-string format "%s(default %s) " equal ""] 6)) (defun find-tag (tagname &optional next other-window) "\ Find tag (in current tag table) whose name contains TAGNAME. Selects the buffer that the tag is contained in and puts point at its definition. If TAGNAME is a null string, the expression in the buffer around or before point is used as the tag name. If second arg NEXT is non-nil (interactively, with prefix arg), searches for the next tag in the tag table that matches the tagname used in the previous find-tag. See documentation of variable tags-file-name." (interactive (byte-code " !" [current-prefix-arg (nil t) find-tag-tag "Find tag: "] 2)) (byte-code "Ȉ ? eb #?<