;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:52:43 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/textmodes/reftex-global.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`reftex-global.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\302\303!\207" [provide reftex-global require reftex] 2)
#@129 Create TAGS file by running `etags' on the current document.
The TAGS file is also immediately visited with `visit-tags-table'.
(defalias 'reftex-create-tags-file #[nil "\304!\210\305 \306 \307\310\311\312\n\313#\"\212\314	!q\210\315\316!\210\317!\210\320\321!,\207" [current-prefix-arg master files cmd reftex-access-scan-info reftex-TeX-master-file reftex-all-document-files format "etags %s" mapconcat identity " " reftex-get-file-buffer-force message "Running etags to create TAGS file..." shell-command visit-tags-table "TAGS"] 6 (#$ . 721) nil])
(byte-code "\301B\302\301!\204\f \303\303\207" [current-load-list reftex-grep-history boundp nil] 2)
#@75 Last grep command used in \[reftex-grep-document]; default for next grep.
(defvar reftex-grep-command "grep -n " (#$ . 1388))
#@137 Run grep query through all files related to this document.
With prefix arg, force to rescan document.
No active TAGS table is required.
(defalias 'reftex-grep-document #[(grep-cmd) "\304!\210\305\306!\307\310\n\311\312	\313##\314!*\207" [current-prefix-arg files grep-cmd cmd reftex-access-scan-info reftex-all-document-files t format "%s %s" mapconcat identity " " grep] 7 (#$ . 1521) (list (read-from-minibuffer "Run grep on document (like this): " reftex-grep-command nil nil 'reftex-grep-history))])
#@229 Regexp search through all files of the current document.
Starts always in the master file.  Stops when a match is found.
To continue searching for next match, use command \[tags-loop-continue].
No active TAGS table is required.
(defalias 'reftex-search-document #[(&optional regexp) "\303 	\204 \304\305\306\"!	\307\230\203 \310!\311\n!\210\312	\313C\")\207" [default regexp current-prefix-arg reftex-this-word read-string format "Search regexp in document [%s]: " "" regexp-quote reftex-access-scan-info tags-search reftex-all-document-files] 4 (#$ . 2036) nil])
#@292 Run a query-replace-regexp of FROM with TO over the entire document.
Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
If you exit (\[keyboard-quit] or ESC), you can resume the query replace
with the command \[tags-loop-continue].
No active TAGS table is required.
(defalias 'reftex-query-replace-document #[(&optional from to delimited) "\305 	\204 \306\307\310\"!\211\311\230\203 \312!\n\204# \306\307\313	\"!\314!\210\315	\n\f\206/ \316C$)\207" [default from to current-prefix-arg delimited reftex-this-word read-string format "Replace regexp in document [%s]: " "" regexp-quote "Replace regexp %s with: " reftex-access-scan-info tags-query-replace reftex-all-document-files] 6 (#$ . 2614) nil])
#@57 Produce a list of all duplicate labels in the document.
(defalias 'reftex-find-duplicate-labels #[nil "\304\305!\210\306 \307\310\311\312J!\"\312	!\211\204 \313\314!\210\315\316!\210\317\320!L\210\321 \210\322c\210\323\324\261\210\325c\210\326c\210\327\330 !\210\331\332\333\"\210\331\334\335\"\210	\203m 	@@\203d 	@A\203d \nT\336\337	@\340#\341\261\210	\211A@\210\202G eb\210\n\307U\205\200 \342p!\210\343 \210\344\345!+\207" [reftex-docstruct-symbol dlist cnt master reftex-access-scan-info t reftex-TeX-master-file 0 mapcar #[(x) "\303	@\304>\203 \303\202) \305	@\nJ\"\306GW\203' \307	@C\310\311\"\"\202) \303C)\207" [x1 x reftex-docstruct-symbol nil (toc bof eof bib thebib label-numbers xr xr-doc master-dir file-error bibview-cache appendix is-multi index) reftex-all-assoc-string 1 append mapcar #[(x) "\301\3028!\207" [x abbreviate-file-name 3] 3]] 5] reftex-uniquify-by-car error "No duplicate labels in document" switch-to-buffer-other-window "*Duplicate Labels*" make-local-variable TeX-master erase-buffer "                MULTIPLE LABELS IN CURRENT DOCUMENT:\n" " Move point to label and type `r' to run a query-replace on the label\n" " and its references.  Type `q' to exit this buffer.\n\n" " LABEL               FILE\n" " -------------------------------------------------------------\n" use-local-map make-sparse-keymap local-set-key [113] #[nil "\300p!\210\301 \207" [kill-buffer delete-window] 2 "Kill this buffer." nil] [114] reftex-change-label mapconcat identity "\n    " "\n" kill-buffer delete-window message "Document does not contain duplicate labels."] 7 (#$ . 3355) nil])
#@247 Query replace FROM with TO in all \label and \ref commands.
Works on the entire multifile document.
If you exit (\[keyboard-quit] or ESC), you can resume the query replace
with the command \[tags-loop-continue].
No active TAGS table is required.
(defalias 'reftex-change-label #[(&optional from to) "\303\304!	\204 \305\306\307\"!	\310\230\203 \n\204\" \305\306\311	\"!\312\313\314	!\315Q\306\316\n\"\")\207" [default from to reftex-this-word "-a-zA-Z0-9_*.:" read-string format "Replace label globally [%s]: " "" "Replace label %s with: " reftex-query-replace-document "\\\\\\(label\\|[a-zA-Z]*ref\\){" regexp-quote "}" "\\\\\\1{%s}"] 5 (#$ . 4979) nil])
#@581 Renumber all simple labels in the document to make them sequentially.
Simple labels are the ones created by RefTeX, consisting only of the
prefix and a number.  After the command completes, all these labels will
have sequential numbers throughout the document.  Any references to
the labels will be changed as well.  For this, RefTeX looks at the
arguments of any macros which either start or end in the string `ref'.
This command should be used with care, in particular in multifile
documents.  You should not use it if another document refers to this
one with the `xr' package.
(defalias 'reftex-renumber-simple-labels #[nil "\306\307!\210\310 \203 \311\312!\204 \313\314!\210\315\316\317\320#\321Q\322	\323Q\324	\325Q\326\327\330\"\331 ,-J.\332/\3320\3321\3322\3323\3324\3325.\211A.@\2111\203\260 1@;\203K \333\n1@\"\203K 1@2\334\335\3071@\"\"4\3342/\"\203\207 \313\3362\"\210\335\3071@\"\3374\211AT\241!P323B/B/23\230\204K \3405\202K 5\204\271 \313\341!\210\342\331 !\210\343 \210\344,/\f\345%0\311\346\347/G0,G$!\203\3406\344,/\f\332%\210\3327)\310 \203\373 \311\350!\203\373 \343 \210\306\307!\210\351\352!\202\351\353!.\207" [reftex-typekey-to-prefix-alist re-core label-re search-re error-fmt label-numbers-alist reftex-access-scan-info 1 reftex-is-multi yes-or-no-p "Replacing all simple labels in multiple files is risky.  Continue? " error "Abort" "\\(" mapconcat cdr "\\|" "\\)" "\\`" "\\([0-9]+\\)\\'" "[{,]\\(" "\\([0-9]+\\)\\)[,}]" "Undefined label or reference %s. Ignore and continue? " mapcar #[(x) "A\301B\207" [x 0] 2] reftex-all-document-files nil string-match assoc match-string "Duplicate label %s" int-to-string t "Simple labels are already in correct sequence" reftex-ensure-write-access reftex-save-all-document-buffers reftex-translate test format "Replace %d items at %d places in %d files? " "Save entire document? " message "Done replacing simple labels." "No replacements done" files reftex-docstruct-symbol list translate-alist n entry label new-label nr-cell changed-sequence inhibit-quit quit-flag] 6 (#$ . 5650) nil])
(defalias 'reftex-translate #[(files search-re translate-alist error-fmt test) "\306\307\211\211\211\211\211\211 \211A @\211\203\336 \310!\211\204. \311\312\"\210q\210\212\214~\210eb\210\313!\307\314#\203\332 \315u\210\212\316\317!\320\"\"\304 \321\317!\211A\211\206^ `b\210\n\203\326 \322\323!\204\202 \322\324!\204\202 \322\325!\204\202 \322\326#\327!\"!\203\326 \330\f!\210$\203\256 \204\256 \331\216\332\317\306\224\306\225#\210\333 \210\334\326%\"!\204\252 \311\335!\210)\202\326 $\203\277 \203\277 T\202\326 $\204\326 \203\326 \317\224b\210\317\224\317\225|\210Ac\210)\2028 *\202 .\207" [cell pos macro buf match-data label 0 nil reftex-get-file-buffer-force error "No such file %s" re-search-forward t -1 reftex-match-string 1 assoc reftex-what-macro looking-at "\\\\ref" "\\\\[a-zA-Z]*ref\\(range\\)?[^a-zA-Z]" "\\\\ref[a-zA-Z]*[^a-zA-Z]" format regexp-quote set-match-data ((reftex-unhighlight 1)) reftex-highlight ding y-or-n-p "Abort" file n files search-re translate-alist reftex-find-label-regexp-format test error-fmt] 9])
#@141 Save all documents associated with the current document.
The function is useful after a global action like replacing or renumbering
labels.
(defalias 'reftex-save-all-document-buffers #[nil "\303 \304\211\212\n\211A@\211\205# \305	!\211\203 q\210\306 \210\202 ,\207" [buffer file files reftex-all-document-files nil reftex-get-buffer-visiting save-buffer] 4 (#$ . 8855) nil])
#@120 Make sure we have write access to all files in FILES.
Also checks if buffers visiting the files are in read-only mode.
(defalias 'reftex-ensure-write-access #[(files) "\304\211\n\211A@\211\205` \305	!\204$ \306 \210\307\310\311	\"!\204$ \312\313!\210\314	!\204: \306 \210\307\310\315	\"!\204: \312\313!\210\316	!\211\203 \212q\210)\203 \306 \210\307\310\317\320!\"!\204 \312\313!\210\202 *\207" [buf file files buffer-read-only nil file-exists-p ding y-or-n-p format "No such file %s. Continue? " error "Abort" file-writable-p "No write access to %s. Continue? " reftex-get-buffer-visiting "Buffer %s is read-only. Continue? " buffer-name] 5 (#$ . 9247)])
