%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/textmodes/ |
Current File : //usr/local/share/emacs/27.2/lisp/textmodes/reftex-cite.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'reftex) #@60 The history list of regular expressions used for citations (defvar reftex-cite-regexp-hist nil (#$ . 426)) #@47 Prompt and help string for citation selection (defconst reftex-citation-prompt "Select: [n]ext [p]revious [r]estrict [ ]full_entry [q]uit RET [?]Help+more" (#$ . 539)) (defconst reftex-citation-help " n / p Go to next/previous entry (Cursor motion works as well).\n g / r Start over with new regexp / Refine with additional regexp.\n SPC Show full database entry in other window.\n f Toggle follow mode: Other window will follow with full db entry.\n . Show insertion point.\n q Quit without inserting \\cite macro into buffer.\n TAB Enter citation key with completion.\n RET Accept current entry (also on mouse-2) and create \\cite macro.\n m / u Mark/Unmark the entry.\n e / E Create BibTeX file with all (marked/unmarked) entries\n a / A Put all (marked) entries into one/many \\cite commands.") (defalias 'reftex-with-special-syntax-for-bib '(macro . #[(&rest body) "\301\302\303\304\305BB\306BBE\207" [body let ((saved-syntax (syntax-table))) unwind-protect progn (set-syntax-table reftex-syntax-table-for-bib) ((set-syntax-table saved-syntax))] 6])) #@100 Return the expanded value of variable `reftex-default-bibliography'. The expanded value is cached. (defalias 'reftex-default-bibliography #[nil "\300\302N=\204 \303\300\304\305 \"#\210\303\300\302#\210\300\304N\207" [reftex-default-bibliography default-directory :reftex-raw put :reftex-expanded reftex-locate-bibliography-files] 6 (#$ . 1676)]) #@110 Test if BibTeX or \begin{thebibliography} should be used for the citation. Find the bof of the current file. (defalias 'reftex-bib-or-thebib #[nil "J\306\307 D \235\206 \303\n\236\304\n\236\n>\f\n>\f\2048 \2048 \303 \236\304 \236 >\f > GGV\203I \205N \303\202N \f\205N \304.\207" [reftex-docstruct-symbol docstruct rest bib thebib bibmem bof buffer-file-name thebibmem] 2 (#$ . 2033)]) #@310 Return list of bibfiles for current document. When using the chapterbib or bibunits package you should either use the same database files everywhere, or separate parts using different databases into different files (included into the mater file). Then this function will return the applicable database files. (defalias 'reftex-get-bibfile-list #[nil "\301 \210\302\303\304\305 D\306\305 DJ\235#A\206- \303\306\305 DJ\235\236A\206- \303J\236A\206- \307\310!\207" [reftex-docstruct-symbol reftex-access-scan-info reftex-last-assoc-before-elt bib eof buffer-file-name bof error "\\bibliography statement missing or .bib files not found"] 5 (#$ . 2448)]) #@289 Find BibTeX KEY in any file in FILE-LIST in another window. If MARK-TO-KILL is non-nil, mark new buffer to kill. If HIGHLIGHT is non-nil, highlight the match. If ITEM in non-nil, search for bibitem instead of database entry. If RETURN is non-nil, just return the entry and restore point. (defalias 'reftex-pop-to-bibtex-entry #[(key file-list &optional mark-to-kill highlight item return) "\203 \306\307 !\310Q\202 \311\307 !\312Qp\313\211\313\211\3142\270 \203\245 @A\315\f\"\211\204A \316\317\f\"\210 q\210`~\210eb\210\320\n\313\321#\204[ b\210\202$ \322\224b\210`\203\203 \203o \322\225b\210`\323!{b\210q\210\324\314\"\210\325 !\210b\210\326\322!\210 \203\234 \327\322\211\224\322\225#\210\324\314\330 \"\210\202$ q\210\203\263 \316\331 \"\202\267 \316\332 \"0.\207" [item key re buffer-conf file buf "\\\\bibitem[ ]*\\(\\[[^]]*\\]\\)?[ ]*{" regexp-quote "}" "@\\(?:\\w\\|\\s_\\)+[ \n ]*[{(][ \n ]*" "[, \n}]" nil exit reftex-get-file-buffer-force error "No such file %s" re-search-forward t 0 reftex-end-of-bib-entry throw switch-to-buffer-other-window recenter reftex-highlight selected-window "No \\bibitem with citation key %s" "No BibTeX entry with citation key %s" pos oldpos file-list mark-to-kill return highlight] 5 (#$ . 3109)]) (defalias 'reftex-end-of-bib-entry #[(item) "\212\3011 \203 \302\210\303\304!\210\305\224S\202 \306\307!\210`0\202% \210d\310`\\^)\207" [item (error) nil re-search-forward "\\\\bibitem\\|\\\\end{thebibliography}" 0 forward-list 1 300] 3]) #@105 Query for regexps for searching entries using DEFAULT as default. Return a list of regular expressions. (defalias 'reftex--query-search-regexps #[(default) "\305\306\307\310Q\205\f C \205! \311\312!\203 \312 \202! \313\314\nJ\"A\211\2031 \f\235\2031 \2024 \fB*\315\211\211\316&\317\"\207" [default reftex-mode reftex-docstruct-symbol coll def split-string completing-read "Regex { && Regex...}: [" "]: " fboundp LaTeX-bibitem-list assoc bibview-cache nil reftex-cite-regexp-hist "[ ]*&&[ ]*"] 9 (#$ . 4654)]) #@125 Extract bib entries which match regexps from BUFFERS. BUFFERS is a list of buffers or file names. Return list with entries. (defalias 'reftex-extract-bib-entries #[(buffers) "\306\211\306<\203 \202 C\306\211@\306\211AB\306\211CD\306\211EF\306G\307\310 !G\311G!\211\203A \312\232\203E GC@A\313\314 \206R \315\"\203Z \316\317!\210\313 \315\"\203e \316\320!\210\212\321 H\322\216\f\203\256\f@B\fA\323B!\203\214 \324B!\203\214 BA\202\225 \325BI?\"AA\204\243 \326\327B\"\210\202\311 \326\330A\"\210\331A!\204\311 \332\333\334\335\336A!!\"!\203\311 rAq\210\337\340\211\"\210)Aq\210\341 J\342\216\343K!\210\212eb\210\344 \306\340#\203\247\3452\243`D\346\347\306\340#\204\370 \350\345\306\"\210`E\351\225b\210\3521\n\353\354!0\202\210Db\210\350\345\306\"\210`F\355\356!\227\357\230\2049\355\356!\227\360\230\2049\355\356!\227\361\230\2049`DW\203BDb\210\350\345\306\"\210E`{@\n\203d\313@@\"\204\\\350\345\306\"\210\211A\210\202J\362\306EF#C\363@BCBC\364\365C\"\203\210\366C\367C!\"C\370\371C!BCBC\372\373C\"CB\211C B\2110\210\202\334 +\374 \210\202l + \237L\375\267\202\322\376 \377\"\202\323\376 \201M \"\202\323\376 \201N \"\202\323 . \207" [re-list first-re rest-re buffers buffer-list found-list nil regexp-quote reftex-get-bibkey-default reftex--query-search-regexps (#1="") string-match "\\`[ ]*\\'" #1# user-error "Empty regular expression" "Regular expression matches the empty string." current-window-configuration #[nil "\301!\207" [#2=#:wconfig set-window-configuration] 2] bufferp buffer-live-p reftex-get-file-buffer-force message "No such BibTeX file %s (ignored)" "Scanning bibliography database %s" verify-visited-file-modtime y-or-n-p format "File %s changed on disk. Reread from disk? " file-name-nondirectory buffer-file-name revert-buffer t syntax-table #[nil "\301!\207" [saved-syntax set-syntax-table] 2] set-syntax-table re-search-forward search-again re-search-backward "\\(\\`\\|[\n ]\\)[ ]*@\\(\\(?:\\w\\|\\s_\\)+\\)[ \n ]*[{(]" throw 0 (error) up-list 1 match-string 2 "string" "comment" "c" reftex-parse-bibtex-entry "&entry" assoc "crossref" append reftex-get-crossref-alist "&formatted" reftex-format-bib-entry reftex-get-bib-field "&key" reftex-kill-temporary-buffers #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (author 441 year 448 reverse-year 457)) sort reftex-bib-sort-author entry buffer1 buffer alist key-point start-point end-point default #2# reftex-keep-temporary-buffers saved-syntax reftex-syntax-table-for-bib reftex-sort-bibtex-matches reftex-bib-sort-year reftex-bib-sort-year-reverse] 7 (#$ . 5182)]) #@97 Compare bib entries E1 and E2 by author. The name of the first different author/editor is used. (defalias 'reftex-bib-sort-author #[(e1 e2) "\304\305\"\304\305 \"\203' \n\203' @\n@\230\203' \211A\210\n\211A\210\202\n @;\203; \n@;\203; @\n@\231\202? @;?*\207" [e1 e2 al2 al1 reftex-get-bib-names "author"] 4 (#$ . 7871)]) #@59 Compare bib entries E1 and E2 by year in ascending order. (defalias 'reftex-bib-sort-year #[(e1 e2) "\302\303\304\"A\206\n \305!\302\303\304 \"A\206 \305!W\207" [e1 e2 string-to-number assoc "year" "0"] 5 (#$ . 8209)]) #@60 Compare bib entries E1 and E2 by year in descending order. (defalias 'reftex-bib-sort-year-reverse #[(e1 e2) "\302\303\304\"A\206\n \305!\302\303\304 \"A\206 \305!V\207" [e1 e2 string-to-number assoc "year" "0"] 5 (#$ . 8436)]) #@41 Return the alist from a crossref ENTRY. (defalias 'reftex-get-crossref-alist #[(entry) "\303\304\"A\305\212\214~\210\306\307\310\n!\311Q\305\312#\2051 \313\224\3141' \315\316!0\202+ \210\202, \210\317\305 `#,\207" [entry start crkey assoc "crossref" nil re-search-forward "@\\w+[{(][ \n ]*" regexp-quote "[ \n ]*," t 0 (error) up-list 1 reftex-parse-bibtex-entry] 4 (#$ . 8672)]) #@167 Extract bib-entries from the egin{thebibliography} environment. Parsing is not as good as for the BibTeX database stuff. The environment should be located in FILES. (defalias 'reftex-extract-bib-entries-from-thebibliography #[(files) "\306\211\306\211\306\211\306\211'()\204 \307\310!\210)\211A)\242\211'\203\212 \311'*?\"\211\204: \307\312'\"\210\313\314'\"\210r\nq\210\212\214~\210eb\210\315\316\306\317#\203\206 \320\321!\210`\315\322\306\317#\203g \320\323!\210`\203\200 \203\200 \324\325\326\327\330\331\332 \"\333\"\"\"\" b\210\202K +\202 \204\222 \307\334!\210\335\336 !(\337(!\211\203\247 \340\232\203\253 (C\341\342 @\"\203\267 \307\343!\210 \211A\242\211\203\320 \203\320 \344\306\325\345\"\"\202\267 \325\346\"\211.\207" [start end buf entries re re-list nil error "Need file name to find thebibliography environment" reftex-get-file-buffer-force "No such file %s" message "Scanning thebibliography environment in %s" re-search-forward "\\(\\`\\|[\n ]\\)[ ]*\\\\begin{thebibliography}" t beginning-of-line 2 "\\(\\`\\|[\n ]\\)[ ]*\\\\end{thebibliography}" 1 append mapcar reftex-parse-bibitem delete #1="" split-string buffer-substring-no-properties "[ \n ]*\\\\bibitem[ ]*\\(\\[[^]]*]\\)*[ ]*" "No bibitems found" regexp-quote reftex-get-bibkey-default reftex--query-search-regexps (#1#) string-match "\\`[ ]*\\'" "Empty regular expression" delq #[(x) "\302\303\304 \"A\"\205\f \207" [re x string-match assoc "&entry"] 5] #[(x) "\301\302!BB\303\304\"B\211\207" [x "&formatted" reftex-format-bibitem reftex-get-bib-field "&key"] 4] file default files reftex-keep-temporary-buffers] 11 (#$ . 9065)]) #@108 Return the word before the cursor. If the cursor is in a citation macro, return the word before the macro. (defalias 'reftex-get-bibkey-default #[nil "\301\302!\212\203 \303\304@\"\203 Ab\210\305\306x\210\307 *\207" [macro reftex-what-macro 1 string-match "cite" "^a-zA-Z0-9" nil reftex-this-word] 3 (#$ . 10738)]) #@95 Return a list with the author or editor names in ENTRY. If FIELD is empty try "editor" field. (defalias 'reftex-get-bib-names #[(field entry) "\303 \"\211\304\232\203 \303\305 \"\306\307\n\"\203! \310\311\312\313\n$\202 \306\314\n\"\2032 \310\304\312\313\n$\202! \306\315\n\"\203C \310\304\312\313\n$\2022 \306\316\n\"\203T \310\317\312\313\n$\202C \320\n\311\")\207" [field entry names reftex-get-bib-field "" "editor" string-match "\\band\\b[ ]*" replace-match "\n" nil t "[-.a-zA-Z]+\\.[ ]*\\|,.*\\|[{}]+" "^[ ]+\\|[ ]+$" "[ ][ ]+" " " split-string] 6 (#$ . 11065)]) #@167 Parse BibTeX ENTRY. If ENTRY is nil then parse the entry in current buffer between FROM and TO. If RAW is non-nil, keep double quotes/curly braces delimiting fields. (defalias 'reftex-parse-bibtex-entry #[(entry &optional from to raw) "\306\211\211\211\212\214\f\203# \307\310!q\210\311 \210\312 !\210\313 \210\fc\210\2025 ~\210#\2035 $\2035 #$}\210eb\210\314\315\306\316#\203M \317\320\321!\227B\322\320\323!BD\314\324\306\316#\203\357 \320\321!\227g\325U\203\205 %\203m `\321u\210\202\271 \321u\210`\3261} \327\321!0\202\201 \210\202\271 \210\202\271 g\330U\203\261 %\203\230 `\321u\210\202\235 \321u\210`\331\332\306\316#\203\271 `\323Zf\333U\204\235 \202\271 `\314\334\306\321#\210%\203\312 `Sf\335U\204\312 `\202\314 `S&\336 &\")\337\340\"\203\346 \341\342\306\316$\202\325 \nBB\202M *,\207" [field start key alist entry reftex-syntax-table-for-bib nil get-buffer-create " *RefTeX-scratch*" fundamental-mode set-syntax-table erase-buffer re-search-forward "@\\(\\(?:\\w\\|\\s_\\)+\\)[ \n ]*[{(][ \n ]*\\([^ \n ,]+\\)" t "&type" reftex-match-string 1 "&key" 2 "\\(\\(?:\\w\\|-\\)+\\)[ \n ]*=[ \n ]*" 123 (error) up-list 34 search-forward "\"" 92 "[ ]*[\n ,}]" 44 buffer-substring-no-properties string-match "[\n ]\\|[ ][ ]+" replace-match " " from to raw stop] 5 (#$ . 11657)]) #@90 Extract the field FIELDNAME from ENTRY. If FORMAT is non-nil `format' entry accordingly. (defalias 'reftex-get-bib-field #[(fieldname entry &optional format) "\304 \"\211\203 \203 \303\nA\"\202 \nA\202 \305)\207" [fieldname entry cell format assoc ""] 4 (#$ . 12982)]) #@54 Format a BibTeX ENTRY so that it is nice to look at. (defalias 'reftex-format-bib-entry #[(entry) "\306\307\"\310\311 \312#\313\314\"\313\315\"\313\316\"\313\317\". \320\267\202v \313\321\"\211/G\322U\203: \313\323\"\202<