4.4BSD/usr/src/contrib/emacs-18.57/lisp/bibtex.elc


(defvar bibtex-mode-syntax-table nil "\
")

(defvar bibtex-mode-abbrev-table nil "\
")

(define-abbrev-table (quote bibtex-mode-abbrev-table) nil)

(defvar bibtex-mode-map (make-sparse-keymap) "\
")

(defun bibtex-mode nil "\
Major mode for editing bibtex files.  Commands:
\\{bibtex-mode-map}

A command such as \\[bibtex-Book] will outline the fields for a BibTeX
book entry.

The optional fields are preceded by \"OPT\", thus ignored by BibTeX.
Use \\[bibtex-remove-opt] to remove \"OPT\" on the current line.

Use \\[bibtex-find-it] to position the dot at the end of the string on the same line.
Use \\[bibtex-next-position] to move to the next position to fill in.  Use \\[kill-current-line]
to kill the whole line.

M-x bibtex-x-environment binds a mode-specific X menu to control+right
mouse button.
M-x bibtex-sun-environment binds a mode-specific Sun menu to right
mouse button.

Fields:
    address
           Publisher's address
    annote
           Long annotation used for annotated bibliographies (begins sentence)
    author
           Name(s) of author(s), in BibTeX name format
    booktitle
           Book title when the thing being referenced isn't the whole book.
           For book entries, the title field should be used instead.
    chapter
           Chapter number
    edition
           Edition of a book (e.g., \"second\")
    editor
           Name(s) of editor(s), in BibTeX name format.
           If there is also an author field, then the editor field should be
           for the book or collection that the work appears in
    howpublished
            How something strange has been published (begins sentence)
    institution
           Sponsoring institution
    journal
           Journal name (macros are provided for many)
    key
           Alphabetizing and labeling key (needed when no author or editor)
    month
           Month (macros are provided)
    note
           To help the reader find a reference (begins sentence)
    number
           Number of a journal or technical report
    organization
           Organization (sponsoring a conference)
    pages
           Page number or numbers (use `--' to separate a range)
    publisher
           Publisher name
    school
           School name (for theses)
    series
           The name of a series or set of books.
           An individual book will will also have it's own title
    title
           The title of the thing being referenced
    type
           Type of a Techreport (e.g., \"Research Note\") to be used instead of
           the default \"Technical Report\"
    volume
           Volume of a journal or multivolume work
    year
           Year---should contain only numerals
---------------------------------------------------------
Entry to this mode calls the value of bibtex-mode-hook
if that value is non-nil." (interactive) (byte-code "Ȉ ? !\"\"\"\"\"\"	!؉ى!
!ۉ	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	@A#	BC#DE!FGH!" [bibtex-mode-syntax-table bibtex-mode-map major-mode mode-name local-abbrev-table bibtex-mode-abbrev-table paragraph-start left-margin nil kill-all-local-variables copy-syntax-table set-syntax-table modify-syntax-entry 36 "$$  " 37 "<   " 12 ">   " 10 39 "w   " 64 use-local-map bibtex-mode "BibTeX" make-local-variable "^[ 
	]*$" define-key "	" bibtex-find-it "
" bibtex-next-position "\"" bibtex-remove-double-quotes "" kill-current-line "" bibtex-Article "" bibtex-Book "" bibtex-InProceedings "	" bibtex-InBook "i" bibtex-InCollection "I" "
" bibtex-Manual "m" bibtex-MastersThesis "M" bibtex-Misc "" bibtex-remove-opt "" bibtex-PhdThesis "p" bibtex-Proceedings "" bibtex-TechReport "" bibtex-string "" bibtex-Unpublished "?" describe-mode auto-fill-mode 1 17 run-hooks bibtex-mode-hook] 35))

(defun bibtex-move-outside-of-entry nil "\
Make sure we are outside of a bib entry" (byte-code "`dU`eU!  d#" [t looking-at "[ 
]*@" backward-paragraph forward-paragraph re-search-forward "[ 	
]*"] 7))

(defun bibtex-entry (entry-type required optional) (byte-code " Qc!	#c	c
#c!!" [entry-type required optional bibtex-move-outside-of-entry "@" "{,

}

" previous-line 3 mapconcat bibtex-make-entry ",
" bibtex-make-opt-entry up-list -1 forward-char 1] 7))

(defun bibtex-make-entry (str) (interactive "s") (byte-code "Q" [str nil "  " " = 	\"\""] 3))

(defun bibtex-make-opt-entry (str) (interactive "s") (byte-code "Q" [str nil "  OPT" " = 	\"\""] 3))

(defun bibtex-Article nil (interactive) (byte-code "#" [nil bibtex-entry "Article" ("author" "title" "journal" "year") ("volume" "number" "pages" "month" "note")] 4))

(defun bibtex-Book nil (interactive) (byte-code "#" [nil bibtex-entry "Book" ("author" "title" "publisher" "year") ("editor" "volume" "series" "address" "edition" "month" "note")] 4))

(defun bibtex-Booklet nil (interactive) (byte-code "#" [nil bibtex-entry "Booklet" ("title") ("author" "howpublished" "address" "month" "year" "note")] 4))

(defun bibtex-InBook nil (interactive) (byte-code "#" [nil bibtex-entry "InBook" ("author" "title" "chapter" "publisher" "year") ("editor" "pages" "volume" "series" "address" "edition" "month" "note")] 4))

(defun bibtex-InCollection nil (interactive) (byte-code "#" [nil bibtex-entry "InCollection" ("author" "title" "booktitle" "publisher" "year") ("editor" "chapter" "pages" "address" "month" "note")] 4))

(defun bibtex-InProceedings nil (interactive) (byte-code "#" [nil bibtex-entry "InProceedings" ("author" "title" "booktitle" "year") ("editor" "pages" "organization" "publisher" "address" "month" "note")] 4))

(defun bibtex-Manual nil (interactive) (byte-code "#" [nil bibtex-entry "Manual" ("title") ("author" "organization" "address" "edition" "year" "month" "note")] 4))

(defun bibtex-MastersThesis nil (interactive) (byte-code "#" [nil bibtex-entry "MastersThesis" ("author" "title" "school" "year") ("address" "month" "note")] 4))

(defun bibtex-Misc nil (interactive) (byte-code "#" [nil bibtex-entry "Misc" ("author" "title" "howpublished" "year" "month" "note")] 4))

(defun bibtex-PhdThesis nil (interactive) (byte-code "#" [nil bibtex-entry "PhDThesis" ("author" "title" "school" "year") ("address" "month" "note")] 4))

(defun bibtex-Proceedings nil (interactive) (byte-code "#" [nil bibtex-entry "Proceedings" ("title" "year") ("editor" "publisher" "organization" "address" "month" "note")] 4))

(defun bibtex-TechReport nil (interactive) (byte-code "#" [nil bibtex-entry "TechReport" ("author" "title" "institution" "year") ("type" "number" "address" "month" "note")] 4))

(defun bibtex-Unpublished nil (interactive) (byte-code "#" [nil bibtex-entry "Unpublished" ("author" "title" "note") ("year" "month")] 4))

(defun bibtex-string nil (interactive) (byte-code " c!!" [nil bibtex-move-outside-of-entry "@string{ = \"\"}
" previous-line 1 forward-char 8] 4))

(defun bibtex-next-position nil "\
Finds next position to write in." (interactive) (byte-code "! " [nil forward-line 1 bibtex-find-it] 3))

(defun bibtex-find-it nil (interactive) (byte-code "ˆÈ ` #!! #!)" [beg t nil "Find position on current line (if possible) to add entry text." beginning-of-line end-of-line search-backward "," backward-char 1 looking-at "\"" forward-char] 7))

(defun bibtex-remove-opt nil "\
Removes the 'OPT' starting optional arguments." (interactive) (byte-code " !!! " [nil beginning-of-line forward-char 2 looking-at "OPT" delete-char 3 bibtex-find-it] 6))

(defun kill-current-line nil "\
Kills the current line." (interactive) (byte-code " !" [nil beginning-of-line kill-line 1] 3))

(defun bibtex-remove-double-quotes nil "\
Removes \"\" around string." (interactive) (byte-code "È ` ` 	#)!	#&!+b*" [here eol t nil bibtex-find-it end-of-line beginning-of-line search-forward "\"" delete-char -1] 9))

(defun bibtex-x-help (arg) "\
Mouse commands for BibTeX mode" (byte-code "	\"!)" [selection arg x-popup-menu ("BibTeX commands" ("Document types" ("article in Conference Proceedings" . bibtex-InProceedings) ("article in journal" . bibtex-Article) ("Book" . bibtex-Book) ("Booklet" . bibtex-Booklet) ("Master's Thesis" . bibtex-MastersThesis) ("PhD. Thesis" . bibtex-PhdThesis) ("Technical Report" . bibtex-TechReport) ("technical Manual" . bibtex-Manual) ("Conference Proceedings" . bibtex-Proceedings) ("in a Book" . bibtex-InBook) ("in a Collection" . bibtex-InCollection) ("miscellaneous" . bibtex-Misc) ("unpublished" . bibtex-Unpublished)) ("others" ("next field" . bibtex-next-position) ("to end of field" . bibtex-find-it) ("remove OPT" . bibtex-remove-opt) ("remove quotes" . bibtex-remove-double-quotes) ("remove this line" . kill-current-line) ("describe BibTeX mode" . describe-mode) ("string" . bibtex-string))) call-interactively] 3))

(defun bibtex-x-environment nil "\
Set up X menus for BibTeX mode.  Call it as bibtex-mode-hook, or interactively" (interactive) (byte-code "ˆ!	#" [mouse-map x-button-c-right nil require x-mouse define-key bibtex-x-help] 5))

(defmenu bibtex-sun-entry-menu ("Article In Conf. Proc." (lambda nil (eval-in-window *menu-window* (bibtex-InProceedings)))) ("Article In Journal" (lambda nil (eval-in-window *menu-window* (bibtex-Article)))) ("Book" (lambda nil (eval-in-window *menu-window* (bibtex-Book)))) ("Booklet" (lambda nil (eval-in-window *menu-window* (bibtex-Booklet)))) ("Master's Thesis" (lambda nil (eval-in-window *menu-window* (bibtex-MastersThesis)))) ("PhD. Thesis" (lambda nil (eval-in-window *menu-window* (bibtex-PhdThesis)))) ("Technical Report" (lambda nil (eval-in-window *menu-window* (bibtex-TechReport)))) ("Technical Manual" (lambda nil (eval-in-window *menu-window* (bibtex-Manual)))) ("Conference Proceedings" (lambda nil (eval-in-window *menu-window* (bibtex-Proceedings)))) ("In A Book" (lambda nil (eval-in-window *menu-window* (bibtex-InBook)))) ("In A Collection" (lambda nil (eval-in-window *menu-window* (bibtex-InCollection)))) ("Miscellaneous" (lambda nil (eval-in-window *menu-window* (bibtex-Misc)))) ("Unpublished" (lambda nil (eval-in-window *menu-window* (bibtex-Unpublished)))))

(defmenu bibtex-sun-menu ("BibTeX menu") ("add entry" . bibtex-sun-entry-menu) ("add string" (lambda nil (eval-in-window *menu-window* (bibtex-string)))) ("describe BibTeX mode" (lambda nil (eval-in-window *menu-window* (describe-mode)))) ("Main Emacs menu" . emacs-menu))

(defun bibtex-sun-menu-eval (window x y) "\
Pop-up menu of BibTeX commands." (byte-code "	T
S$" [window x y sun-menu-evaluate bibtex-sun-menu] 5))

(defun bibtex-sun-environment nil "\
Set up sun menus for BibTeX mode.  Call it as bibtex-mode-hook, or interactively" (interactive) (byte-code "\"" [nil local-set-mouse (text right) bibtex-sun-menu-eval] 3))