
(provide (quote dtags))

(load "tags")

(defvar dtag-table-files nil "\
List of file names covered by current dtag table.
nil means it has not been computed yet; do (dtag-table-files) to compute it.")

(defvar dtags-file-name "docs:DTAGS" "\
Where to find the doc tags, use visit-dtags-table to change it.")

(defun visit-dtags-table (file) "\
Tell dtags 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 dtag-table-files nil dtags-file-name expand-file-name file-directory-p "DTAGS"] 4))

(defun visit-dtags-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 ÎÏ\"‡" [dtags-file-name dtag-table-files nil t call-interactively visit-dtags-table get-file-buffer find-file-noselect verify-visited-file-modtime yes-or-no-p "Dtags file has changed, read new contents? " revert-buffer 1 12 error "File %s not a valid dtag table"] 10))

(defun dtag-table-files nil "\
Return a list of files in the current dtag table.
File names returned are absolute." (byte-code "ŠÅ ˆ†P Æebˆm?…I ÇÈ!ˆÉ ˆÊË!ˆ`‰ˆÌp!‰ˆ
bˆÍÎ`SŠÏ ˆ`)\"Ð!\"	B‰ˆÇÈ!ˆÑ!ˆ‚ ˆÒ	!‰))‡" [dtag-table-files files prev size dtags-file-name visit-dtags-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 doc-tag (tagname &optional next) "\
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‚ ‰ˆ‰ˆÑÈÉ#?…< ÒÓƒ8 Ô‚9 Õ#ˆÖ×!?…I Èˆ‚$ ˆÑØ!ˆÙÚ Û
!\"‰ˆÜ`SŠÝ ˆ`)\"‰ˆÑÞ!ˆßp!‰)ˆà á
!ˆâ ˆã ˆäÈå!æP†“ e‰ˆ?…¢ Zbˆo?…¾ ç\\É#‰ˆèé\"‰ˆ‚” ˆ†Ó çÈÉ#†Ó Òê
#+ˆÝ ˆëì!ˆí!),ˆî‰ˆÉ‡" [current-prefix-arg buffer file linebeg startpos next tagname last-tag nil t dtags-file-name win offset found pat tags-loop-form visit-dtags-table-buffer search-forward error "No %sentries containing %s" "more " "" looking-at "[^
]*" "" expand-file-name file-of-tag file-name-directory buffer-substring beginning-of-line "," read selected-window find-file-other-window widen push-mark 1000 regexp-quote "[ 	]" re-search-forward * 3 "%s not found in %s" recenter 0 select-window (doc-tag nil t)] 26))

(defun dtags-search (regexp) "\
Search through all files listed in tag table for match for REGEXP.
Stops when a match is found.
To continue searching for next match, use command \\[tags-loop-continue].

See documentation of variable tags-file-name." (interactive "sTags search (regexp): ") (byte-code "ÂˆÅÆ\"… 	@Ç=ƒ ÈÂ!‚( ÇÂÃF‰ˆÉ ‰ˆÊ ˆÈ ‡" [regexp tags-loop-form nil t next-file-list equal "" re-search-forward tags-loop-continue dtag-table-files next-file] 6))

(defun list-dtags (string) "\
Display list of dtags in file FILE.
FILE should not contain a directory spec
unless it has one in the dtag table." (interactive "sList dtags (in file): ") (byte-code "ÁˆÂÃÄ!ˆÃ!ˆÅ ˆŠÆ ˆÇbˆÈÉÊQ!ˆËÇ!ˆm†( ÌÍ!?…A ÃÎ`ÏÐ!ˆ`\"!ˆÅ ˆËÇ!ˆ‚! )‘‡" [string nil "*Dtags List*" princ "Dtags in file " terpri visit-dtags-table-buffer 1 search-forward "
" "," forward-line looking-at "" buffer-substring skip-chars-forward "^"] 15))

(defun dtags-apropos (string) "\
Display list of all dtags in dtag table REGEXP matches." (interactive "sDtag apropos (regexp): ") (byte-code "ÁˆÃÄÅ!ˆÆ!ˆÇ ˆŠÈ ˆÉbˆÊÁÂ#…6 Ë ˆÄÌ`ÍÎ!ˆ`\"!ˆÇ ˆÏÉ!ˆ‚ )‘‡" [string nil t "*Dtags List*" princ "Dtags matching regexp " prin1 terpri visit-dtags-table-buffer 1 re-search-forward beginning-of-line buffer-substring skip-chars-forward "^" forward-line] 14))

(defun make-dtags (file) (interactive "FDoc file: ") (byte-code "ÅˆË!‰ˆŠÌ	!ˆÍÎ!Í	!qˆdbˆÏÐÑÒ$ˆ`Ñcˆ
qˆÓ ˆÔ!ˆebˆÕÖÅÆ#…B ×Ø!ˆm?…w `×Ù!ˆÚ`\"ÛÜ\"T	qˆÏÝÞ	!ÒÞ!Ñ&ˆ
q*)ˆ‚4 ˆqˆß`Ü#
bˆÞ
!c))*)ˆàá	!Æ\"‡" [file dtags-file-name buf-doc buf-tags size-pos nil t beg fn line size expand-file-name find-file-noselect get-buffer-create "*make-doc-temp*" insert 12 10 44 erase-buffer insert-file search-forward "" skip-chars-forward "
" "^ 	" buffer-substring count-lines 1 127 int-to-string - pop-to-buffer get-buffer] 22))
