;ELC   
;;; Compiled by rms@psilocin.gnu.org on Sun Mar  8 19:08:37 1998
;;; from file /gd/gnu/emacs/lisp/textmodes/refer.el
;;; in Emacs version 20.2.89.6
;;; with bytecomp version 2.38
;;; with all optimizations.
;;; This file uses opcodes which do not exist in Emacs 18.

(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 "`refer.el' was compiled for Emacs 19.29 or later"))


(byte-code "\302\303!\210\304\303\305\306\307	\310&\207" [:prefix :group provide refer custom-declare-group nil "Look up references in bibliography files." "refer-" wp] 8)
#@787 Directory, or list of directories, to search for \.bib files. Can
be set to 'bibinputs or 'texinputs, in which case the environment
variable BIBINPUTS or TEXINPUTS, respectively, is used to obtain a
list of directories.  Useful only if refer-bib-files is set to 'dir or
a list of file names (without directory). A value of nil indicates the
current working directory.

If refer-bib-directory is 'bibinputs or 'texinputs, it is setq'd to
the appropriate list of directories when it is first used.

Note that an empty directory is interpreted by BibTeX as indicating
the default search path. Since Refer does not know that default path,
it cannot search it. Include that path explicitly in your BIBINPUTS
environment if you really want it searched (which is not likely to
happen anyway).
(custom-declare-variable 'refer-bib-directory 'nil '(#$ . 710) :type '(choice (repeat directory) (const bibinputs) (const texinputs)) :group 'refer)
#@769 *List of \.bib files to search for references,
or one of the following special values:
nil  = prompt for \.bib file (if visiting a \.bib file, use it as default)
auto = read \.bib file names from appropriate command in buffer (see
       refer-bib-files-regexp) unless the buffer's mode is bibtex-mode,
       in which case only the buffer is searched
dir  = use all \.bib files in directories referenced by refer-bib-directory.

If a specified file doesn't exist and has no extension, a \.bib extension
is automatically tried.

If refer-bib-files is nil, auto or dir, it is setq'd to the appropriate
list of files when it is first used if refer-cache-bib-files is t.  If
refer-cache-bib-files is nil, the list of \.bib files to use is re-read
each time it is needed.
(custom-declare-variable 'refer-bib-files ''dir '(#$ . -1652) :type '(choice (repeat file) (const nil) (const auto) (const dir)) :group 'refer)
#@258 *Variable determining whether the value of refer-bib-files should be cached.
If t, initialize the value of refer-bib-files the first time it is used.  If
nil, re-read the list of \.bib files depending on the value of refer-bib-files
each time it is needed.
(custom-declare-variable 'refer-cache-bib-files 't '(#$ . -2571) :type 'boolean :group 'refer)
#@499 *Regexp matching a bibliography file declaration.
The current buffer is expected to contain a line such as
\bibliography{file1,file2,file3}
which is read to set up refer-bib-files.  The regexp must specify the command
(such as \bibliography) that is used to specify the list of bib files.  The
command is expected to specify a file name, or a list of comma-separated file
names, within curly braces.
If a specified file doesn't exist and has no extension, a \.bib extension
is automatically tried.
(custom-declare-variable 'refer-bib-files-regexp '"\\\\bibliography" '(#$ . -2930) :type 'regexp :group 'refer)
(byte-code "\305\306!\210\305\307!\210\305\310!\210\311\300!\204 \312\300	B\311\302!\204  \312\302	B\311\303!\204, \312\303	B\311\304!\2048 \312\304	B\312\207" [refer-saved-state current-load-list refer-previous-keywords refer-saved-pos refer-same-file make-variable-buffer-local refer-bib-files refer-cache-bib-files refer-bib-directory boundp nil] 2)
#@248 Find entry in refer-bib-files containing KEYWORDS.
If KEYWORDS is nil, prompt user for blank-separated list of keywords.
If CONTINUE is t, or if called interactively with a prefix arg, look for next
entry by continuing search from previous point.
(defalias 'refer-find-entry #[(keywords &optional continue) "\204 	\203\f \n\202 \303\304!\305	\"\207" [keywords continue refer-previous-keywords read-string "Keywords: " refer-find-entry-internal] 3 (#$ . 3909) (list nil current-prefix-arg)])
#@74 Find next occurrence of entry in refer-bib-files.  See refer-find-entry.
(defalias 'refer-find-next-entry #[nil "\301\302\"\207" [refer-previous-keywords refer-find-entry-internal t] 3 (#$ . 4413) nil])
#@126 Inserts at point in current buffer the "key" field of the entry
found on the last refer-find-entry or refer-find-next-entry.
(defalias 'refer-yank-key #[nil "`\301\213c\210`U?\205 \302!)\207" [old-point ((byte-code "\212\301@!\210\302\303!\203 \304\224\304\225{\202 \305\306@\")\207" [refer-saved-state find-file looking-at "[ 	\n]*@\\s-*[a-zA-Z][a-zA-Z0-9]*\\s-*{\\s-*\\([^ 	\n,]+\\)\\s-*," 1 error "Cannot find key for entry in file %s."] 3)) set-mark] 2 (#$ . 4624) nil])
(defalias 'refer-find-entry-internal #[(keywords continue) "\306!p\307 \307 	\203 \n\202 \310\311 \312\310\211\204_ 8\211\203G T\211\203G \f\313\314!!\230\203) \f\204Y \315\316\"\211=\202Z \317\211\203) \f\204t \320\316!\203m \321 \315\316\"\322\203 \202\201 !\210\305\323\215\210\322!.\207" [keywords continue refer-saved-state refer-saved-pos file found refer-convert-string-to-list-of-strings selected-window nil refer-get-bib-files 0 buffer-file-name window-buffer next-window nomini t one-window-p split-window select-window (byte-code "\203W \306@!\203 @\202 \306@\307P!\205 @\307P	\203D \310	\f#\203< `\311\312!\210\313\314\315	!\"\210\202S \316A\202S \317\320@\321 #\210\322\323!\210A)\202  \317\324\321 #\207" [files file refer-saved-state keywords-list refer-saved-pos keywords file-exists-p ".bib" refer-find-entry-in-file recenter 0 throw found find-file nil message "Scanning %s... No such file" ding sit-for 1 "Keywords \"%s\" not found in any .bib file"] 4) n files new-window old-window old-buffer keywords-list refer-same-file] 9])
(defalias 'refer-find-entry-in-file #[(keywords-list file &optional old-pos) "\306\307\"\210\310!\210\311!q\210\312!\210	\204 eb\210\202# 	b\210\313\314!\210`\315\316\n\204H m\204H \313\314!\210`\317\320\"\211\204) \211b\210\202) \n\203\\ \fb\210\321\322\316\323#\210\306\324\"\202b \306\325\"\210\316+\207" [file old-pos found end begin keywords-list message "Scanning %s..." expand-file-name find-file-noselect find-file forward-paragraph 1 0 nil refer-every #[(keyword) "b\210\303	\n\304#\207" [begin keyword end re-search-forward t] 4] re-search-forward "\\W" t "Scanning %s... found" "Scanning %s... not found"] 5])
(defalias 'refer-every #[(pred l) "\204 \302\207	@!\205 A?\206 \303	A\"\207" [l pred nil refer-every] 3])
(defalias 'refer-convert-string-to-list-of-strings #[(s) "p\303\304!q\210\305 \210\306\n!c\210eb\210\307c\210\310\311\312\313#\203( \314\315\313\211#\210\202 db\210\316c\210eb\210\317!	q\210*\207" [temp-buffer current s get-buffer-create "*refer-temp*" erase-buffer regexp-quote "(\"" re-search-forward "[ 	]+" nil t replace-match "\" \"" "\")" read] 4])
(defalias 'refer-expand-files #[(file-list dir-list) "\306\211\211\211\f@\211\203\\ \307!\211@\211\203U \310\311	\"!\2032 \312\n\311	\"C\"\306\211\202 \310\311\313P	\"!\203N \312\n\311\313P	\"C\"\306\211\202 A\211\202 \fA\211\202	 \n,\207" [dirs dir files file file-list dir-list nil copy-alist file-exists-p expand-file-name append ".bib"] 6])
(defalias 'refer-get-bib-files #[nil "\204 \306\202{ \307=\204 \310=\203p \311\307=\203 \312\202  \313!\314\211\204* \315\316\317\n\"\203V \n\320\211\224O\211\321\230\204L \322!\203L \323\324\314\"C	\")\n\320\225\314O\202* \n\321\230\204h \322\n!\203h \323\nC	\"	\237\211*\202{ <\203y \202{ C\204\250 \324,\325=\203\235 \326\327\330\331\332 !\"\333\332 !\331\332 !\334$\202\243 \326\335\314\211\334$!C\202d\336=\203\212,\325=\211-\203\277 C\202eb\210\337.\340P\314\334#\203`\337\341\314\334#\210\342\343!\210`{C/\344\345!\204\375 \323/\343u\210`\337\341\314\334#\210\342\343!\210`{C\"/\202\335 /)\202\346\347!)/\350/\f\")\202d\303=\203?\f\237\314\211/\211@\211\2039\323\351\334\352#/\"/	A\211\202!/+\202d<\203W\307=\204P\310=\203W\350\f\"\202d<\203`\202d\346\353\"/\307=\204r\310=\203t\f0\203|//*\207" [refer-bib-directory dirs envvar dir dir-list refer-bib-files (".") texinputs bibinputs getenv "TEXINPUTS" "BIBINPUTS" nil "." string-match ":" 0 "" file-directory-p append expand-file-name bibtex-mode read-file-name format ".bib file: (default %s) " file-name-nondirectory buffer-file-name file-name-directory t ".bib file: " auto re-search-forward "\\s-*{" "[,}]" backward-char 1 looking-at "}" error "No \\\\bibliography command in this buffer, can't read refer-bib-files" refer-expand-files directory-files "\\.bib$" "Illegal value for refer-bib-files: %s" major-mode refer-same-file refer-bib-files-regexp files refer-cache-bib-files] 8])
