;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:25:22 2007 ;;; from file /home/cyd/emacs/lisp/textmodes/reftex-ref.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-ref.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303!\210\302\304!\207" [provide reftex-ref require reftex reftex-parse] 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]]\211U\203M\n@G\\\n@\206\230\313\202\230U\203h\f@G\\\314\\\f@\206\230\313\202\230U\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 (#$ . 683)]) (defalias 'reftex-label-info-update #[(cell) "@A@\3068\3078\3108\311 \312=?\"\211\204, \n\313 \f\314\257\202i\212q\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) "\306\307\"\205 \310\311\"\312 \n\"A\f\206\313  \314  \203]\315=\204O\203];\203>\306 \"\202L<\203K \235\202L\316\203] \317\320 !\f\257\202\221\206f\321!\312\"A@\322\312\"8\323$ \f\257,-\207" [label prefix reftex-prefix-to-typekey-alist typekey file reftex-trust-label-prefix string-match "^[a-zA-Z0-9]+:" match-string 0 assoc buffer-file-name reftex-in-comment t nil reftex-nicify-text reftex-context-substring reftex-label-location 2 reftex-short-context trust in-comment env-or-mac bound reftex-env-or-mac-alist parse reftex-location-start derive text] 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 \"\211A@\307\n8\310\311!\306 @ \"9\312\211:;\312\211<=\312\211>?\312@\313\n8\204:\31398\203Eh\314>\203E\315;\316\306 A\"A\206Q \317P<\320\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:\212;\204eG\203o A\250\203o Ab\210\324 )\211H@IHA\203\202\357\202\203\360J\361 K\312LICJ>MHA\204\235\315@M\203\275M: LK\312J\257MAB\241\210\362C\363\315#\210.G\204\351N\203\322N:\f\"\202\327\304\f:\"c\210O\203\351\364\365!\203\351\365:!\210P\203\372\366\367 !!\210\366\367\330!!\210@\203Q\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" "INVALID 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 invalid 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 (#$ . 2708) 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 (#$ . 5841)]) (defalias 'reftex-latin1-to-ascii #[(string) "\303\304\305\306\n\307#*\207" [emacsp tab string "@@@@@@@@@@@@@@@@@@'@@@@@@@@@@@@@ icLxY|S\"ca<--R-o|23'uq..1o>423?AAAAAAACEEEEIIIIDNOOOOOXOUUUUYP3aaaaaaaceeeeiiiidnooooo:ouuuuypy" t 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\314\315\f\"\306 \316\216 \317\232\203,\320\321\322 !!\202\357 \323\232\203W\324\325 !\320\322 !)\312\326\327)!P \"\203R )G\310O\202S *\202\357 \330\232\203f\320\321\325 !!\202\357 \331\232\203x\321\324\325 !\311\332O!\202\357 \333\232\203\207\334 \206\357\335\202\357 \336\232\203\356\310\211*+\310,\212\306 \337\216\340-\310\341#\203\314\342\343!*\344*.\"A\211+9\203\306\345\306 \346\216+ *!\202\312\345+!,\344*/\"\206\350\344,/\"\206\350\341/\236\206\350\341\347DA.\202\357\335*\315\224 G\\S\350 \310\211\f$\202 \f-\207" [save-match-data-internal replace num letter prefix file match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) nil 0 string-match "\\%\\([a-zA-Z]\\)" match-string 1 ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) "f" file-name-sans-extension file-name-nondirectory buffer-file-name "F" file-name-directory reftex-TeX-master-file "\\`" regexp-quote "m" "M" -1 "u" user-login-name "" "S" ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) re-search-backward t reftex-match-string 2 assoc abs ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) "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\211A\307 \f\"\206( \310B\fB\241@\211AT \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 "\301B\302\303!\210\304B\305\306!\207" [current-load-list reftex-select-label-prompt (lambda (#1=#:defconst-tmp-var) (defconst reftex-select-label-prompt #1#)) "Select: [n]ext [p]revious [r]escan [ ]context e[x]tern [q]uit RET [?]HELP+more" reftex-select-label-help (lambda (#2=#:defconst-tmp-var) (defconst reftex-select-label-help #2#)) " 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\211'(\316\211)*+`\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\350h\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 126) 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] 5 (#$ . 10000) 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]) (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#\3208\307 \321\211!\"\321\211#$\321\211%&\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\212q\210\312 !)!\210\202#\311\313!\210\314 \210)?\310=\204.\310 \210\315\316p\"\210\317@\320\321\322\323\324A\325\326\327\330\331\257 B\332 \333U\203t\334C\335\336!\210\337D \334EFGHI\206iJK\334& J)\202\207I\203\204\340I #J\202\207\317J\317CJ\206\220\317J\334I\341LMNJ\342O&\211P@QPA@R\343P8S\317JQ\204\302\344\345\334\"\210Q\346=\203\317\314 \210\202Q\347=\204\335Q\350=\203\363T\203\345\350Q\314 \210\351SQ#\210\202Q\352=\203\314 \210F?F\202Q\353=\203UI\354 \202Q\355=\2036\314 \210T\203.\356T!V\202D?D\202Q\357=\203H\314 \210E?E\202Q\360=\203Z\314 \210G?G\202Q\361=\203l\314 \210H?H\202Q\362=\203WX\344\345\317\"\210\202Q\363=\203\262\364YZ\"Z\365ZY8A!\206\234\366\367!ZY8@\206\247\370Kq\210\371 \210\202Q;\203\322\372Q[J\"\206\306Q DCCX\344\345\317\"\210\202Q\373>\203\\\203\346\\\237X\202\367R\203\364RCCX\202\367\334XX\203 Q\374\232\203 \375XBXXWq\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@\3028E\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\202q\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\211\310\211 \310\f\311\312\215.\207" [this-window error errorf label file buffer selected-window message nil exit (byte-code "@\3068\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\204zeb\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] 3]) (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\"\2039p 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 (#$ . 18291) 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 (#$ . 18509) 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 (#$ . 18727) 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]) #@153 Prompt for a label (with completion) and jump to the location of this label. Optional prefix argument OTHER-WINDOW goes to the label in another window. (defalias 'reftex-goto-label #[(&optional other-window) "\306 \210\307  J\310\311\n\312\313$\314 \n\"\315\f\313\316\317$\210\320 \2041\321!\210\322\323 !!\210 b\210\324\325!-\207" [wcfg reftex-docstruct-symbol docstruct label selection where reftex-access-scan-info current-window-configuration completing-read "Label: " #[(x) "@;\207" [x] 1] t assoc reftex-show-label-location nil stay point-marker set-window-configuration switch-to-buffer marker-buffer reftex-unhighlight 0 other-window] 5 (#$ . 19319) "P"])