;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:25:21 2007 ;;; from file /home/cyd/emacs/lisp/textmodes/reftex-global.el ;;; in Emacs version 22.0.99 ;;; 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 shell-quote-argument " " reftex-get-file-buffer-force message "Running etags to create TAGS file..." shell-command visit-tags-table "TAGS"] 6 (#$ . 666) nil]) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list reftex-grep-history default-boundp set-default nil] 3) #@75 Last grep command used in \[reftex-grep-document]; default for next grep. (defvar reftex-grep-command "grep -n " (#$ . 1377)) #@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 (#$ . 1510) (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 (#$ . 2025) nil]) #@294 Do `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], RET or q), 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 (#$ . 2603) nil]) #@57 Produce a list of all duplicate labels in the document. (defalias 'reftex-find-duplicate-labels #[nil "\305\306!\210\307 \310\311\312\313J!\"\313 !\211\204\314\315!\210\316\317!\210\320\304!\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\202Geb\210\n\310U\205\200\342p!\210\343 \210\344\345!+\207" [reftex-docstruct-symbol dlist cnt master TeX-master reftex-access-scan-info t reftex-TeX-master-file 0 mapcar #[(x) "\303 @\304>\203 \303\202)\305 @\nJ\"\306GW\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\3028!\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 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 (#$ . 3346) nil]) #@257 Run `query-replace-regexp' of FROM with TO in all macro arguments. Works on the entire multifile document. If you exit (\[keyboard-quit], RET or q), 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 "{" regexp-quote "}" "{%s}"] 5 (#$ . 4970) 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\211/0\332\21112\332\21134\3325.\211A.@\2111\203\2601@;\203K\333\n1@\"\203K1@2\334\335\3071@\" \"4\3342/\"\203\207\313\3362\"\210\335\3071@\"\3374\211AT\241!P323B/B/23\230\204K\3405\202K5\204\271\313\341!\210\342\331 !\210\343 \210\344, /\f\345%0\311\346\347/G0,G$!\203\3406\344, /\f\332%\210\3327)\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] 7 (#$ . 5614) 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!\211A\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\277T\202\326$\204\326\203\326\317\224b\210\317\224\317\225|\210Ac\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\203q\210\306 \210\202,\207" [buffer file files reftex-all-document-files nil reftex-get-buffer-visiting save-buffer] 4 (#$ . 8819) 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\212q\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 (#$ . 9211)]) (defalias 'reftex-isearch-wrap-function #[nil "\204 \303 p\304\"!\210\n\203e\202db\207" [isearch-word isearch-next-buffer-function isearch-forward switch-to-buffer t] 4]) (defalias 'reftex-isearch-push-state-function #[nil "\300\301\302\303pEE\207" [lambda (cmd) reftex-isearch-pop-state-function cmd] 5]) (defalias 'reftex-isearch-pop-state-function #[(cmd buffer) "\301!\207" [buffer switch-to-buffer] 2]) (defalias 'reftex-isearch-isearch-search #[(string bound noerror) "\306\203 \203 \307\202*\310\202*\n\203! \203\311\202*\312\202* \203)\313\202*\314 #\206@?\205@\306\315\316\217*\207" [isearch-word isearch-forward isearch-regexp search-fun nxt-buff string nil word-search-forward word-search-backward re-search-forward re-search-backward search-forward search-backward (byte-code "\205G \n \f#\204F \203+p!\211\n\204 \306\307!\210\202\310\n!\210eb\210\202p!\211\n\204;\306\311!\210\202\310\n!\210db\210\202`\207" [isearch-next-buffer-function search-fun string bound noerror isearch-forward error "Wrap forward" switch-to-buffer "Wrap backward" nxt-buff] 5) ((error)) bound noerror] 4]) (defalias 'reftex-isearch-switch-to-next-file #[(crt-buf &optional wrapp) "\306 \210\307!\310 \211\n\205C\f\203 \204;\311\n!\202; \204*\312\n!\237\211\n@ \230\2048\nA\211\202+\nA\n\205C\313\n@!+\207" [crt-buf cb flist orig-flist wrapp isearch-forward reftex-access-scan-info buffer-file-name reftex-all-document-files last copy-list find-file] 3]) #@321 When on, isearch searches the whole document, not only the current file. This minor mode allows isearch to search through all the files of the current TeX document. With no argument, this command toggles `reftex-isearch-minor-mode'. With a prefix argument ARG, turn `reftex-isearch-minor-mode' on iff ARG is positive. (defalias 'reftex-isearch-minor-mode #[(&optional arg) "\n\204\n\206\306\n!\307X?\211 =\204\226\203^\310 \311\211\203U\f@r q\210 \203M\312\313!\210\314 \312\315!\210\316 \312\317!\210\320\312\321!\210\322\323)\fA\211\204$*\324\325\300\"\210\202\226\310 \311\211\203\220@r q\210 \203\206\326\313!\210\326\315!\210\326\317!\210\326\321!\210\311)A\211\204h*\327\325\300\"\210\330\331 !)\207" [reftex-isearch-minor-mode old-reftex-isearch-minor-mode arg crt-buf #1=#:--cl-dolist-temp-- reftex-mode prefix-numeric-value 0 buffer-list nil make-local-variable isearch-wrap-function reftex-isearch-wrap-function isearch-search-fun-function #[nil "\300\207" [reftex-isearch-isearch-search] 1] isearch-push-state-function reftex-isearch-push-state-function isearch-next-buffer-function reftex-isearch-switch-to-next-file t add-hook reftex-mode-hook kill-local-variable remove-hook set-buffer-modified-p buffer-modified-p #2=#:--cl-dolist-temp--] 4 (#$ . 11398) "P"]) (byte-code "\300\301\302\303\211\301%\207" [add-minor-mode reftex-isearch-minor-mode "/I" nil] 6)