;ELC   
;;; compiled by cthomp@willow on Thu Aug 12 00:36:06 1993
;;; from file /era/era-0.80/editor/lisp/modes/bib-mode.el
;;; emacs version 19.8 (beta8) Lucid.
;;; bytecomp version 2.15; 14-jul-93.
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19")))
    (error "This file was compiled for Emacs 19."))

(provide 'bib-mode)
(defvar bib-file "~/my-bibliography.bib" "\
Default name of file used by addbib")
(defvar unread-bib-file "~/to-be-read.bib" "\
Default name of file used by unread-bib in bib-mode")
(byte-code "!!	#	#	#	#" [boundp bib-mode-map copy-keymap text-mode-map define-key "" return-key-bib "" unread-bib " " mark-bib "`" abbrev-mode] 4)
(defvar bib-mode-abbrev-table nil "\
Abbrev table used in bib mode")
(fset 'addbib #[nil "	!db " [find-file bib-file bib-mode] 2 "\
Set up editor to add to troff bibliography file specified 
by global variable bib-file.  See description of bib-mode." nil])
(fset 'bib-mode #[nil " \n!\"\n!!" [text-mode use-local-map bib-mode-map "Bib" mode-name bib-mode major-mode define-abbrev-table bib-mode-abbrev-table nil local-abbrev-table abbrev-mode 1 run-hooks bib-mode-hook] 3 "\
Mode for editing lookbib style bibliographies.  
Hit RETURN to get next % field key.
If you want to ignore this field, just hit RETURN again.
Use text-mode to turn off.  

 journal papers:                    A* T D J V N P K W X
 articles in books & proceedings:   A* T D B E* I C P K W X 
 tech reports:                      A* T D R I C K W X
 books:                             A* T D I C K W X

Fields:

A uthor		T itle		D ate  		J ournal
V olume		N umber		P age		K eywords
B in book or proceedings	E ditor		C ity & state
I nstitution, school, or publisher
R eport number or 'phd thesis' or 'masters thesis' or 'draft' or 
     'unnumbered' or 'unpublished'
W here can be found locally (login name, or ailib, etc.)
X comments (not used in indexing)

\\[unread-bib] appends current entry to a different file (for 
example, a file of papers to be read in the future), given by
the value of the variable unread-bib-file.
\\[mark-bib] marks current or previous entry.
Abbreviations are saved in bib-mode-abbrev-table.
Hook can be stored in bib-mode-hook.
Field keys given by variable bib-assoc.

Commands:
\\{bib-mode-map}
" nil])
(defconst bib-assoc '((" *$" . "%A ") ("%A ." . "%A ") ("%A $" . "%T ") ("%T " . "%D ") ("%D " . "%J ") ("%J ." . "%V ") ("%V " . "%N ") ("%N " . "%P ") ("%P " . "%K ") ("%K " . "%W ") ("%W " . "%X ") ("%X " . "") ("%J $" . "%B ") ("%B ." . "%E ") ("%E ." . "%E ") ("%E $" . "%I ") ("%I " . "%C ") ("%C " . "%P ") ("%B $" . "%R ") ("%R " . "%I ")) "\
Describes bibliographic database format.  A line beginning with
the car of an entry is followed by one beginning with the cdr.
")
(fset 'bib-find-key #[(slots) "o!!@@!@AA!" [slots "" previous-line 1 bib-find-key bib-assoc looking-at] 2])
(defvar bib-auto-capitalize t "\
*True to automatically capitalize appropriate
fields in bib-mode")
(byte-code "" ["%[AETCBIJR]" bib-capitalized-fields nil] 1)
(fset 'return-key-bib #[nil "ly! y`y`!!`\\	\")\nb!y!, " [nil end-current beg-current new-key empty 0 looking-at "%. $" newline -1 bib-find-key bib-assoc bib-auto-capitalize bib-capitalized-fields capitalize-title-region 3 kill-line 1 insert-string] 5 "\
Magic when user hits return, used by bib-mode" nil])
(fset 'mark-bib #[nil "y!##!y`!#!yŇ" [0 looking-at "^ *$" re-search-backward "[^ \n]" nil 2 re-search-forward "^%" push-mark next-line 1] 4 "\
set mark at beginning of current or previous bib entry, point at end" nil])
(fset 'unread-bib #[nil " \n!\n! `# `\n#" [mark-bib get-file-buffer unread-bib-file append-to-buffer mark append-to-file] 4 "\
append current or previous entry to file of unread papers
named by variable unread-bib-file" nil])
(defvar capitalize-title-stop-words (concat "the\\|and\\|of\\|is\\|a\\|an\\|of\\|for\\|in\\|to\\|in\\|on\\|at\\|" "by\\|with\\|that\\|its") "\
Words not to be capitialized in a title (unless they are the first
word in the title)")
(byte-code "!Q" [boundp capitalize-title-stop-regexp "\\(" capitalize-title-stop-words "\\)\\(\\b\\|'\\)"] 3)
(fset 'capitalize-title-region #[(begin end) " Ď!}eb!v!#!vo!)!`!Z," [nil syntax-table orig-syntax-table case-fold-search ((set-syntax-table orig-syntax-table)) set-syntax-table text-mode-syntax-table begin end looking-at "[A-Z][a-z]*[A-Z]" 1 capitalize-word re-search-forward "\\<" t capitalize-title-stop-regexp downcase-word] 4 "\
Like capitalize-region, but don't capitalize stop words, except the first" "r"])
(fset 'capitalize-title #[(s) "!q ced\" )" [get-buffer-create "$$$Scratch$$$" erase-buffer s capitalize-title-region buffer-string] 3 "\
Like capitalize, but don't capitalize stop words, except the first"])
