;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:52:47 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/textmodes/reftex-ref.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-ref.el' was compiled for Emacs 19.29 or later"))

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


(byte-code "\300\301!\210\302\303!\207" [provide reftex-ref require reftex] 2)
#@147 Return the environment or macro which determines the label type at point.
If optional BOUND is an integer, limit backward searches to that point.
(defalias 'reftex-label-location #[(&optional bound) "\306	\"\307	\"\310\311	\"\nA\206 \312\fA\206 \312A\206% \312]]\211U\203M \n@G\\\n@\206\230 \313\202\230 U\203h \f@G\\\314\\\f@\206\230 \313\202\230 U\203\227 @\211\204 \313\202\230 9\203\212 \315!\202\230 ;\203\223 \202\230 \313\202\230 \313.\207" [reftex-label-mac-list bound loc1 reftex-label-env-list loc2 loc3 reftex-what-macro reftex-what-environment reftex-what-special-env 1 0 "section" 8 symbol-name p1 p2 p3 pmax reftex-location-start reftex-default-context-position] 4 (#$ . 712)])
(defalias 'reftex-label-info-update #[(cell) "@A@\3068\3078\3108\311\312=?\"\211\204, 	\n\313\f\314\257\202i \212q\210\214~\210\315b\210\316\317\320	!\"\321\312#\204S \316\317\320	!\"\321\312#\203a \322u\210\323\324	\"C\"\202h 	\n\313\314\257*.\207" [cell label typekey file comment note 3 4 5 reftex-get-file-buffer-force t "" "LOST LABEL.  RESCAN TO FIX." 1 re-search-forward format regexp-quote nil -1 append reftex-label-info reftex-keep-temporary-buffers buf reftex-find-label-regexp-format reftex-find-label-regexp-format2] 7])
(defalias 'reftex-label-info #[(label &optional file bound derive env-or-mac) "\206 \306	!\307\n\"A@\f\206 \310 \311\307\n\"8\312\f$\313 \f\257.\207" [env-or-mac bound reftex-env-or-mac-alist typekey file parse reftex-label-location assoc buffer-file-name 2 reftex-short-context reftex-in-comment reftex-location-start derive text in-comment label] 5])
#@474 Insert a unique label.  Return the label.
If ENVIRONMENT is given, don't bother to find out yourself.
If NO-INSERT is non-nil, do not insert label into buffer.
With prefix arg, force to rescan document first.
When you are prompted to enter or confirm a label, and you reply with
just the prefix or an empty string, no label at all will be inserted.
A new label is also recorded into the label list.
This function is controlled by the settings of reftex-insert-label-flags.
(defalias 'reftex-label #[(&optional environment no-insert) "\303!\210	\203 \304	\n\"\204 \305 	\204 \306\307!\210\310\311\215\207" [current-prefix-arg environment reftex-env-or-mac-alist reftex-access-scan-info assoc reftex-label-location error "Can't figure out what kind of label should be inserted" exit (byte-code "\306	\"\211A@\307\n8\310\311!\306@	\"9\312:\312;\312<\312=\312>\312?\312@\313\n8\204: \31398\203E h\314>\203E \315;\316\306A\"A\206Q \317P<\320<!<\321B@\"\203\300 \322\323\324 @CJ#D\325\326\327\330\312\211\315$8!>\331\332>\"\204\241 \331\333>\"\204\241 \331\334>\"\204\241 \331\335>\"\204\241 \331\336>\"\203\253 <>\315?\202\330 <E>!P>\337>\312\317#>\202\330 \321BA@\"\203\321 <>\202\330 \337<\315\">\321BA@\"\204\347 ?\203V=\204Z\340;\203\366 \341\202\367 \342>\":\331\343\344<!\345Q:\"\203\346\347!\210\350\351\312\"\210\202\347 \331F:\"\203/\346\352:\"\210\353 \210\354\326!\210\202\347 \306:CJ\"\211\203O\353 \210\355\304\356:\"!\203\347 \315\211=\202\351 \315\211=\202\351 >:\212;\204eG\203oA\250\203oAb\210\324 )\211H@IHA\203\202\357\202\203\360J\361 K\312LICJ>MHA\204\235\315@M\203\275M:LK\312J\257MAB\241\210\362C\363\315#\210.G\204\351N\203\322N:\f\"\202\327\304\f:\"c\210O\203\351\364\365!\203\351\365:!\210P\203\372\366\367!!\210\366\367\330!!\210@\203Q\203\370 \210:.\f\207" [environment reftex-env-or-mac-alist entry typekey format macro-cell assoc 3 reftex-what-macro 1 nil 5 (91 123) t "%s" "-" reftex-replace-prefix-escapes reftex-typekey-check reftex-last-assoc-before-elt toc reftex-where-am-I reftex-no-props 2 reftex-label-info " " string-match "NO MATCH FOR CONTEXT REGEXP" "ILLEGAL VALUE OF PARSE" "SECTION HEADING NOT FOUND" "HOOK ERROR" "^[ 	]*$" reftex-uniquify-label read-string "Naked Label: " "Label: " "\\`\\(" regexp-quote "\\)?[ 	]*\\'" message "No label inserted." throw exit "Label \"%s\" contains illegal characters" ding sit-for y-or-n-p "Label '%s' exists. Use anyway? " "" "POSITION UNCERTAIN.  RESCAN TO FIX." buffer-file-name put modified fboundp LaTeX-add-labels reftex-erase-buffer reftex-make-selection-buffer-name reftex-parse-one entry1 label naked prefix valid default force-prompt rescan-is-useful reftex-typekey-to-prefix-alist reftex-insert-label-flags reftex-docstruct-symbol reftex-active-toc reftex-string-to-label-function reftex-label-illegal-re no-insert here-I-am-info here-I-am note file text tail reftex-format-label-function reftex-plug-into-AUCTeX reftex-auto-update-selection-buffers reftex-allow-automatic-rescan] 8)] 3 (#$ . 2409) nil])
#@181 Convert a string (a sentence) to a label.
Uses `reftex-derive-label-parameters' and `reftex-label-illegal-re'.  It
also applies `reftex-translate-to-ascii-function' to the string.
(defalias 'reftex-string-to-label #[(string) "\203 \304!\203 	!\305\306	\307\n\310\211&\207" [reftex-translate-to-ascii-function string reftex-label-illegal-re reftex-derive-label-parameters fboundp apply reftex-convert-string "[-~ 	\n,;]+" nil] 8 (#$ . 5542)])
(defalias 'reftex-latin1-to-ascii #[(string) "\303\304\305!?\306\307\n\310#*\207" [emacsp tab string "@@@@@@@@@@@@@@@@@@'@@@@@@@@@@@@@ icLxY|S\"ca<--R-o|23'uq..1o>423?AAAAAAACEEEEIIIIDNOOOOOXOUUUUYP3aaaaaaaceeeeiiiidnooooo:ouuuuypy" featurep xemacs mapconcat #[(c) "\303V\203 \304W\203 \305	\306ZH!\207\n\203, \307V\203, \310W\203, \305	\311ZH!\207\305!\207" [c tab emacsp 127 256 char-to-string 128 2175 2304 2176] 4] ""] 4])
(defalias 'reftex-replace-prefix-escapes #[(prefix) "\306 \307\216\310\311\310\312\313\f\n#\203\333 \314\315\f\"\211\316\232\203' \317\320\321 !!\202\311 \322\232\203R \323\324 !\317\321 !%\312\325\326%!P\"\203M %G\310O\202N *\202\311 \327\232\203a \330 \206\311 \331\202\311 \332\232\203\310 \310&\310'\310(\212\306 \333\216\334)\310\335#\203\246 \336\337!&\340&*\"A\211'9\203\240 \341\306 \342\216' *!\202\244 \341'!(\340&+\"\206\302 \340(+\"\206\302 \335+\236\206\302 \335\343DA.\202\311 \331\315\224	G\\S\344	\310\211\f$\202 \f-\207" [save-match-data-internal replace num letter prefix file match-data ((set-match-data save-match-data-internal)) nil 0 string-match "\\%\\([a-zA-Z]\\)" match-string 1 "f" file-name-sans-extension file-name-nondirectory buffer-file-name "F" file-name-directory reftex-TeX-master-file "\\`" regexp-quote "u" user-login-name "" "S" ((set-match-data save-match-data-internal)) re-search-backward t reftex-match-string 2 assoc abs ((set-match-data save-match-data-internal)) "sec:" replace-match masterdir macro level-exp level reftex-section-regexp reftex-section-levels-all reftex-section-prefixes] 6])
(defalias 'reftex-uniquify-label #[(label &optional force separator) "\306 \210\204 \307	\nJ\"\204 	\207\303\nJ\236\211A\307	\f\"\206( 	\310B\fB\241@\211AT\f\2064 \311\307	\312!Q\nJ\"\203M T\2026 \241\210	\312!Q-\207" [force label reftex-docstruct-symbol label-numbers label-numbers-alist cell reftex-access-scan-info assoc 0 "" int-to-string num separator sep] 6])
(byte-code "\301B\303\302B\304\301\207" [current-load-list reftex-select-label-prompt reftex-select-label-help "Select: [n]ext [p]revious [r]escan [ ]context e[x]tern [q]uit RET [?]HELP+more" " n / p      Go to next/previous label (Cursor motion works as well)\n C-c C-n/p  Go to next/previous section heading.\n b / l      Jump back to previous selection / Reuse last referenced label.\n z          Jump to a specific section, e.g. '3 z' jumps to section 3.\n g / s      Update menu      / Switch label type.\n r / C-u r  Reparse document / Reparse entire document.\n x          Switch to label menu of external document (with LaTeX package `xr').\n F t c      Toggle:  [F]ile borders, [t]able of contents,  [c]ontext\n # %        Toggle:  [#] label counters,   [%] labels in comments\n SPC / f    Show full context in other window / Toggle follow mode.\n .          Show insertion point in other window.\n v   / V    Toggle \\ref <-> \\vref / Rotate \\ref <=> \\fref <=> \\Fref\n TAB        Enter a label with completion.\n m , - +    Mark entry. `,-+' also assign a separator.\n a / A      Put all marked entries into one/many \\ref commands.\n q / RET    Quit without referencing / Accept current label (also on mouse-2)."] 2)
#@489 Make a LaTeX reference.  Look only for labels of a certain TYPE.
With prefix arg, force to rescan buffer for labels.  This should only be
necessary if you have recently entered labels yourself without using
reftex-label.  Rescanning of the buffer can also be requested from the
label selection menu.
The function returns the selected label or nil.
If NO-INSERT is non-nil, do not insert \ref command, just return label.
When called with 2 C-u prefix args, disable magic word recognition.
(defalias 'reftex-reference #[(&optional type no-insert cut) "\306 \210\307!\210	\204\" \n\203 \302 \211\203 	A	@\202\" \310 \311	\f\"\203- \312\2029 \311	\"\2038 \313\2029 \314$%%\315&\316'\316(\316)\316*+`\316\223\210\212\317	!)(\320 \210+\316\211\223\210(@\321=\203| \322\323(A\324#(A@ADC((@A@\325	,\"A\206\215 &&-\203\233 (@@\202G(\204\250 \326\327!\210\316\202G(\203A(@@'\330(@8)\325).\"A*(A(\203\322 \331!\210\316\332&!\333U\203\350 h\334\235\203\350 &\335\316O&$\312\230\203\363 \336\202$\313\230\203\376 \337\202$\340\230\203	\341\202%%*\203*c\210%\203%%'&\"\202,\342&'\211#c\210\332&!\333U\203\250 &\335\316O&\202\250 \326\343!\210'.\207" [current-prefix-arg type reftex-guess-label-type cut reftex-vref-is-default reftex-fref-is-default reftex-check-recursive-edit reftex-access-scan-info reftex-query-label-type reftex-typekey-check "\\vref" "\\fref" "\\ref" "\\ref{%s}" nil reftex-offer-label-menu reftex-ensure-compiled-variables concat mapconcat car "," assoc message "Quit" 2 backward-delete-char string-to-char 126 (32 9 10) 1 reftex-format-vref reftex-format-fref "\\Fref" reftex-format-Fref format "" refstyle reftex-format-ref-function form label labels sep sep1 reftex-select-return-marker reftex-typekey-to-format-alist no-insert reftex-multiref-punctuation] 4 (#$ . 9243) nil])
(defalias 'reftex-guess-label-type #[nil "\306e`\307Z]\310\211\212\211A@\211\203$ \311	@\306#\211\203 )\n\2051 	A\312\225\313\225ZB-\207" [reftex-words-to-typekey-alist cell matched bound case-fold-search words t 35 nil re-search-backward 0 1] 5])
(byte-code "\301B\301\207" [current-load-list reftex-select-label-map] 2)
(defalias 'reftex-offer-label-menu #[(typekey) "p\306	J\236\307\310 B\nA@B\311\312 @\211\313\311#\313\314#\313\315#?\313\316#\313\317#\3208\307 \321!\321\"\321#\321$\321%\321&\321'\322\216\323\324\215\210)\325\326'\".\207" [buf reftex-docstruct-symbol xr-data xr-alist xr-index here-I-am xr "" buffer-file-name 0 reftex-where-am-I reftex-typekey-check 7 3 2 4 5 nil ((byte-code "\212\203 @@q\210\211A@A\202 )\303\304\n\"\210\305 \207" [reftex-buffers-with-changed-invisibility buffer-invisibility-spec selection-buffers mapcar #[(buf) "\301!\205	 \302!\207" [buf buffer-live-p bury-buffer] 2] reftex-kill-temporary-buffers] 3)) exit (byte-code "\300\213\210\202  " [((byte-code "\306 \210\307 \310\f\203 \311\212q\210\312!)!\210\202# \311\313!\210\314 \210)?\310=\204. \310 \210\315\316p\"\210\317@\320\321\322\323\324A\325\326\327\330\331\257B\332 \333U\203t \334C\335\336!\210\337D\334EFGHI\206i JK\334&J)\202\207 I\203\204 \340I#J\202\207 \317J\317CJ\206\220 \317J\334I\341LMNJ\342O&\211P@QPA@R\343P8S\317JQ\204\302 \344\345\334\"\210Q\346=\203\317 \314 \210\202Q\347=\204\335 Q\350=\203\363 T\203\345 \350Q\314 \210\351SQ#\210\202Q\352=\203\314 \210F?F\202Q\353=\203UI\354 \202Q\355=\2036\314 \210T\203.\356T!V\202D?D\202Q\357=\203H\314 \210E?E\202Q\360=\203Z\314 \210G?G\202Q\361=\203l\314 \210H?H\202Q\362=\203WX\344\345\317\"\210\202Q\363=\203\262\364YZ\"Z\365ZY8A!\206\234\366\367!ZY8@\206\247\370Kq\210\371 \210\202Q;\203\322\372Q[J\"\206\306QDCCX\344\345\317\"\210\202Q\373>\203\\\203\346\\\237X\202\367R\203\364RCCX\202\367\334XX\203Q\374\232\203	\375XBXXWq\210\344\345\317\"\210\202\366\376!\210\334\207" [buf reftex-call-back-to-this-buffer reftex-latex-syntax-table default-major-mode reftex-use-multiple-selection-buffers typekey delete-other-windows syntax-table reftex-select-label-mode switch-to-buffer-other-window reftex-make-selection-buffer-name "*RefTeX Select*" reftex-erase-buffer add-to-list selection-buffers t "----  " mode-line-buffer-identification "  " global-mode-string "   (" ")" "  S<" refstyle ">" " -%-" buffer-size 0 nil message "Creating Selection Buffer..." reftex-insert-docstruct reftex-get-offset reftex-select-item reftex-show-label-location 2 throw exit 103 114 82 reftex-reparse-document 99 115 reftex-query-label-type 116 prefix-numeric-value 70 35 37 108 120 reftex-select-external-document reftex-get-file-buffer-force error "Cannot switch document" "" reftex-access-scan-info assoc (97 65 return) 97 concat "This should not happen (reftex-offer-label-menu)" major-mode truncate-lines mode-name mode-line-format buffer-read-only toc files context counter commented here-I-am offset prefix reftex-select-label-prompt reftex-select-label-help reftex-select-label-map follow rtn key data last-data current-prefix-arg here-I-am1 reftex-toc-max-level reftex-last-used-reference entries xr-alist xr-index reftex-docstruct-symbol reftex-select-marked] 13))] 1) mapcar #[(x) "<\203 	@@P@A@\3028E\207\207" [x prefix 2] 4] here-I-am1 typekey reftex-label-menu-flags toc files context counter follow commented prefix selection-buffers offset rtn key data last-data entries] 5])
(defalias 'reftex-reparse-document #[(&optional buffer data key) "\300\213\207" [((byte-code "\212\203 \305!\204 \306\307\310!\"\210\202 q\210	\311=\203\" \312\202# \313\314\n8\315\f\"+\207" [buffer key data file arg bufferp error "No such buffer %s" buffer-name 82 (16) (4) 3 reftex-access-scan-info] 4))] 1])
(defalias 'reftex-query-label-type #[nil "\304	\305#\306\n!\235\204 \307\310\306\n!\"\210\306\n!)\207" [reftex-type-query-prompt reftex-type-query-help key reftex-typekey-list reftex-select-with-char 3 char-to-string error "No such label type: %s"] 4])
(defalias 'reftex-show-label-location #[(data forward no-revisit &optional stay error) "\306 	\203 \301\202\f \307\310\310\310\310\310\f\311\312\215.\207" [this-window error errorf label file buffer selected-window message nil exit (byte-code "@\3068\211\204 \307!\210\310\311\312\"\210\f\203 \313\n!\202# \314\n?\"\211\2031 \315!\210\202; \316	\"\210\310\311\312\"\210\317\320	!\"\203R \321\312\322#\202X \323\312\322#\211\204z eb\210\321\312\322#\211\204z \321\317\320	!\"\312\322#\306\225\203\237 \324\325\306\224\306\225#\210\326\306\224\306\225\"\210\327\330!\210 \204\251 \331!!\210\202\251 \331!!\210\316	\"\210\207" [data label file errorf no-revisit reftex-keep-temporary-buffers 3 "Unknown label - reparse might help" throw exit nil reftex-get-buffer-visiting reftex-get-file-buffer-force switch-to-buffer-other-window "Label %s not found" format regexp-quote re-search-forward t re-search-backward reftex-highlight 0 reftex-show-entry recenter (4) select-window buffer reftex-find-label-regexp-format re forward found reftex-find-label-regexp-format2 stay this-window] 6) re found] 2])
(byte-code "\301B\301\207" [current-load-list font-lock-mode] 2)
(defalias 'reftex-show-entry #[(beg-hlt end-hlt) "\306 \307\245\212\310\311\312\313$\210`)\212\314\311\312\313$\210`)\315\303!\2039 \2039 \316\fT\317\"\2039 pBB\312\211\202\251 \320\321	\n{\"\205\251 \322	\n\"%\323\324!\210\312&\325 \210%c\210\326ed\327\330\331%\210\f	Zb\210\332\333\f	ZT'	ZT#\210\334 \203\221 (\335=\203\201 )\204\240 \335 \210\336\337*\340#\210\341 \210\202\240 (\342=\203\235 )\203\240 \342 \210\343\344!\210\331\211&)+\207" [n beg end buffer-invisibility-spec beg-hlt reftex-buffers-with-changed-invisibility reftex-window-height 2 re-search-backward "[\n]" nil 1 re-search-forward boundp get-char-property invisible string-match "" buffer-substring-no-properties switch-to-buffer "*RefTeX Context Copy*" erase-buffer subst-char-in-region 13 10 t reftex-highlight 0 reftex-refontify latex-mode run-hook-with-args reftex-pre-refontification-functions reftex-hidden turn-on-font-lock fundamental-mode run-hooks reftex-display-copied-context-hook string buffer-read-only end-hlt major-mode font-lock-mode reftex-call-back-to-this-buffer] 6])
#@71 Insert a reference using the `\vref' macro from the varioref package.
(defalias 'reftex-varioref-vref #[nil "\301\302 )\207" [reftex-format-ref-function reftex-format-vref reftex-reference] 1 (#$ . 17672) nil])
#@71 Insert a reference using the `\fref' macro from the fancyref package.
(defalias 'reftex-fancyref-fref #[nil "\301\302 )\207" [reftex-format-ref-function reftex-format-fref reftex-reference] 1 (#$ . 17890) nil])
#@71 Insert a reference using the `\Fref' macro from the fancyref package.
(defalias 'reftex-fancyref-Fref #[nil "\301\302 )\207" [reftex-format-ref-function reftex-format-Fref reftex-reference] 1 (#$ . 18108) nil])
(defalias 'reftex-format-vref #[(label fmt) "\302\303\"\203 \304\305\306\211$\202  \307	\211#\207" [fmt label string-match "\\\\ref{" replace-match "\\vref{" t format] 5])
(defalias 'reftex-format-Fref #[(label def-fmt) "\301\302\"\207" [label format "\\Fref{%s}"] 3])
(defalias 'reftex-format-fref #[(label def-fmt) "\301\302\"\207" [label format "\\fref{%s}"] 3])
