home *** CD-ROM | disk | FTP | other *** search
Wrap
;;; compiled by @win386 on Sat Mar 13 14:30:13 1993 ;;; from file c:/src/lucid-19.4/lisp/modes/bibtex.el ;;; emacs version 19.3 Lucid. ;;; bytecomp version 2.08; 27-aug-92. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs19.")) (defvar bibtex-mode-syntax-table nil "\ ") (defvar bibtex-mode-abbrev-table nil "\ ") (define-abbrev-table 'bibtex-mode-abbrev-table nil) (defvar bibtex-mode-map (make-sparse-keymap) "\ ") (defvar bibtex-pop-previous-search-point nil "\ Next point where bibtex-pop-previous should start looking for a similar entry.") (defvar bibtex-pop-next-search-point nil "\ Next point where bibtex-pop-next should start looking for a similar entry.") (fset 'bibtex-cfield #[(name text) "└ ┬─░ç" [",[ \n]*\\(" name "\\)[ \n]*=[ \n]*\\(" text "\\)"] 5 "\ Create a regexp for a bibtex field of name NAME and text TEXT"]) (defconst bibtex-name-in-cfield 1 "\ The regexp subexpression number of the name part in bibtex-cfield.") (defconst bibtex-text-in-cfield 2 "\ The regexp subexpression number of the text part in bibtex-cfield.") (defconst bibtex-field-name "[A-Za-z][---A-Za-z0-9:_+]*" "\ Regexp defining the name part of a bibtex field.") (defconst bibtex-field-text "\"[^\"]*[^\\\\]\"\\|\"\"\\|[0-9A-Za-z][---A-Za-z0-9:_+]*" "\ Regexp defining the text part of a bibtex field: either a string, or an empty string, or a constant.") (defconst bibtex-field (bibtex-cfield bibtex-field-name bibtex-field-text) "\ Regexp defining the format of a bibtex field") (defconst bibtex-name-in-field bibtex-name-in-cfield "\ The regexp subexpression number of the name part in bibtex-field") (defconst bibtex-text-in-field bibtex-text-in-cfield "\ The regexp subexpression number of the text part in bibtex-field") (defconst bibtex-reference-type "@[A-Za-z]+" "\ Regexp defining the type part of a bibtex reference entry") (defconst bibtex-reference-head (concat "^[ ]*\\(" bibtex-reference-type "\\)[ ]*[({]\\(" bibtex-field-name "\\)") "\ Regexp defining format of the header line of a bibtex reference entry") (defconst bibtex-type-in-head 1 "\ The regexp subexpression number of the type part in bibtex-reference-head") (defconst bibtex-key-in-head 2 "\ The regexp subexpression number of the key part in bibtex-reference-head") (defconst bibtex-reference (concat bibtex-reference-head "\\([ \n]*" bibtex-field "\\)*" "[ \n]*[})]") "\ Regexp defining the format of a bibtex reference entry") (defconst bibtex-type-in-reference bibtex-type-in-head "\ The regexp subexpression number of the type part in bibtex-reference") (defconst bibtex-key-in-reference bibtex-key-in-head "\ The regexp subexpression number of the key part in bibtex-reference") (defconst bibtex-string (concat "^[ ]*@[sS][tT][rR][iI][nN][gG][ \n]*[({][ \n]*\\(" bibtex-field-name "\\)[ \n]*=[ \n]*\\(" bibtex-field-text "\\)[ \n]*[})]") "\ Regexp defining the format of a bibtex string entry") (defconst bibtex-name-in-string 1 "\ The regexp subexpression of the name part in bibtex-string") (defconst bibtex-text-in-string 2 "\ The regexp subexpression of the text part in bibtex-string") (defconst bibtex-name-alignement 2 "\ Alignment for the name part in BibTeX fields. Chosen on aesthetic grounds only.") (defconst bibtex-text-alignment (length " organization = ") "\ Alignment for the text part in BibTeX fields. Equal to the space needed for the longest name part.") (fset 'bibtex-mode #[nil "└ ê ½å┬ !ê¬┤├ ┬ !ê─┼╞\"ê─╟╚\"ê─╔╩\"ê─╦╠\"ê─═╠\"ê─╬╧\"ê─╨╤\"ê─╥╤\"ê─╙╘\"ê╒!ê╫┘┬ !ê▌▐!ê▀αßΓ#êαπΣ#êασµ#êατΦ#êαΘΩ#êαδ∞#êαφε#êα∩≡#êα±≥#êα≤⌠#êα⌡÷#êα≈°#êα∙·#êα√ⁿ#êα²°#êα■ #êαü@ üA #êαüB üC #êαüD üE #êαüF üG #êαüH üI #êαüJ üK #êαüL üM #êαüN üO #êüP üQ !êRüQ \\SüT üU !ç" [kill-all-local-variables bibtex-mode-syntax-table set-syntax-table make-syntax-table modify-syntax-entry 34 "." 36 "$$ " 37 "< " 39 "w " 64 92 "\\" 12 "> " 10 126 " " use-local-map bibtex-mode-map bibtex-mode major-mode "BibTeX" mode-name bibtex-mode-abbrev-table local-abbrev-table make-local-variable paragraph-start "^[ \n ]*$" define-key " " bibtex-find-text "\n" bibtex-next-field "\"" bibtex-remove-double-quotes "" bibtex-clean-entry "?" describe-mode "" bibtex-pop-previous "" bibtex-pop-next "" bibtex-kill-optional-field "" bibtex-empty-field "" 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 auto-fill-mode 1 bibtex-text-alignment left-margin run-hooks bibtex-mode-hook] 4 "\ Major mode for editing bibtex files. \\{bibtex-mode-map} A command such as \\[bibtex-Book] will outline the fields for a BibTeX book entry. The optional fields start with the string OPT, and thus ignored by BibTeX. The OPT string may be removed from a field with \\[bibtex-remove-OPT]. \\[bibtex-kill-optional-field] kills the current optional field entirely. \\[bibtex-remove-double-quotes] removes the double-quotes around the text of the current field. \\[bibtex-empty-field] replaces the text of the current field with the default \"\". The command \\[bibtex-clean-entry] cleans the current entry, i.e. (i) removes double-quotes from entirely numerical fields, (ii) removes OPT from all non-empty optional fields, (iii) removes all empty optional fields, and (iv) checks that no non-optional fields are empty. Use \\[bibtex-find-text] to position the dot at the end of the current field. Use \\[bibtex-next-field] to move to end of the next field. \\[bibtex-x-environment] binds a mode-specific X menu to control+right mouse button. \\[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 technical report (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." nil]) (fset 'bibtex-move-outside-of-entry #[nil "`dU¼É`eU¼ï└┴!¼å┬ ê├ ê─┼d╞#ç" [looking-at "[ \n]*@" backward-paragraph forward-paragraph re-search-forward "[ \n]*" t] 4 "\ Make sure we are outside of a bib entry"]) (byte-code "└┴Mê┬├Mê─┼Mê╞╟Mê╚╔Mê╩╦Mê╠═Mê╬╧Mê╨╤Mê╥╙Mê╘╒Mê╓╫Mê╪┘Mê┌█Mê▄▌Mê▐▀MêαßMêΓπMç" [bibtex-entry #[(entry-type required optional) "└ ê┴\n├▒ê─┼\"ê─╟\"ê╔cê╩uê╦╠!ê═uç" [bibtex-move-outside-of-entry "@" entry-type "{" mapcar bibtex-make-entry required bibtex-make-optional-entry optional "\n}\n\n" -3 up-list -1 1] 3] bibtex-make-entry #[(str) "└cê jê\n├▒êjê┼cê╞ç" [",\n" bibtex-name-alignement str " = " bibtex-text-alignment "\"\"" nil] 2 nil "sBibTeX entry type: "] bibtex-make-optional-entry #[(str) "└cê jê┬─▒ê jê╞cê╟ç" [",\n" bibtex-name-alignement "OPT" str " = " bibtex-text-alignment "\"\"" nil] 3 nil "sOptional BibTeX entry type: "] bibtex-Article #[nil "└┴┬├#ç" [bibtex-entry "Article" ("author" "title" "journal" "year") ("volume" "number" "pages" "month" "note")] 4 nil nil] bibtex-Book #[nil "└┴┬├#ç" [bibtex-entry "Book" ("author" "title" "publisher" "year") ("editor" "volume" "series" "address" "edition" "month" "note")] 4 nil nil] bibtex-Booklet #[nil "└┴┬├#ç" [bibtex-entry "Booklet" ("title") ("author" "howpublished" "address" "month" "year" "note")] 4 nil nil] bibtex-DEAthesis #[nil "└┴┬├#ç" [bibtex-entry "DEAthesis" ("author" "title" "school" "year") ("address" "month" "note")] 4 nil nil] bibtex-InBook #[nil "└┴┬├#ç" [bibtex-entry "InBook" ("author" "title" "chapter" "publisher" "year") ("editor" "pages" "volume" "series" "address" "edition" "month" "note")] 4 nil nil] bibtex-InCollection #[nil "└┴┬├#ç" [bibtex-entry "InCollection" ("author" "title" "booktitle" "publisher" "year") ("editor" "chapter" "pages" "address" "month" "note")] 4 nil nil] bibtex-InProceedings #[nil "└┴┬├#ç" [bibtex-entry "InProceedings" ("author" "title" "booktitle" "year") ("editor" "pages" "organization" "publisher" "address" "month" "note")] 4 nil nil] bibtex-Manual #[nil "└┴┬├#ç" [bibtex-entry "Manual" ("title") ("author" "organization" "address" "edition" "year" "month" "note")] 4 nil nil] bibtex-MastersThesis #[nil "└┴┬├#ç" [bibtex-entry "MastersThesis" ("author" "title" "school" "year") ("address" "month" "note")] 4 nil nil] bibtex-Misc #[nil "└┴┬├#ç" [bibtex-entry "Misc" nil ("author" "title" "howpublished" "year" "month" "note")] 4 nil nil] bibtex-PhdThesis #[nil "└┴┬├#ç" [bibtex-entry "PhdThesis" ("author" "title" "school" "year") ("address" "month" "note")] 4 nil nil] bibtex-Proceedings #[nil "└┴┬├#ç" [bibtex-entry "Proceedings" ("title" "year") ("editor" "publisher" "organization" "address" "month" "note")] 4 nil nil] bibtex-TechReport #[nil "└┴┬├#ç" [bibtex-entry "TechReport" ("author" "title" "institution" "year") ("type" "number" "address" "month" "note")] 4 nil nil] bibtex-Unpublished #[nil "└┴┬├#ç" [bibtex-entry "Unpublished" ("author" "title" "note") ("year" "month")] 4 nil nil] bibtex-string #[nil "└ ê┴┬├▒ê─┼!ê╞uç" [bibtex-move-outside-of-entry "@string{ = " "" "}\n" previous-line 1 8] 3 nil nil]] 2) (fset 'bibtex-next-field #[(arg) "└ ê`┬├─Åê)┼!ç" [bibtex-inside-field start nil (byte-code "└ ê┴òbê┬uç" [bibtex-enclosing-field 0 2] 1) ((error (byte-code "bê┴ê┬uç" [start nil 1] 1))) bibtex-find-text arg] 3 "\ Finds end of text of next BibTeX field; with arg, to its beginning" "P"]) (fset 'bibtex-find-text #[(arg) "└ ê┴ ê\n½îöbê─┼!¡Ä╞uçòbêh╟U¡é╚uç" [bibtex-inside-field bibtex-enclosing-field arg bibtex-text-in-field looking-at "\"" 1 34 -1] 2 "\ Go to end of text of current field; with arg, go to beginning." "P"]) (fset 'bibtex-remove-OPT #[nil "└ ê┴ êè\nöbê├─!½à┼─G!ê)└ ç" [bibtex-inside-field bibtex-enclosing-field bibtex-name-in-field looking-at "OPT" delete-char] 2 "\ Removes the 'OPT' starting optional arguments and goes to end of text" nil]) (fset 'bibtex-inside-field #[nil "└ê┴└xêh┬U½â├uê├uç" [nil " " 44 -1] 2 "\ Try to avoid point being at end of a bibtex field." nil]) (fset 'bibtex-remove-double-quotes #[nil "è└ ê┴ ê\nö\nòbê┼uê╞╟!½ä╚╔!êbê╞╟!¡â╚╔!+ç" [bibtex-inside-field bibtex-enclosing-field bibtex-text-in-field stop start -1 looking-at "\"" delete-char 1] 2 "\ Removes \"\" around string." nil]) (fset 'bibtex-kill-optional-field #[nil "└ ê┴ ê\nöbê├ò├ö╞╟!½ì bê╚╔wê╩ \"¬â╦╠!*ç" [bibtex-inside-field bibtex-enclosing-field bibtex-name-in-field 0 the-beginning the-end looking-at "OPT" " \n," nil kill-region error "Mandatory fields can't be killed"] 3 "\ Kill the entire enclosing optional BibTeX field" nil]) (fset 'bibtex-empty-field #[nil "└ ê┴ ê\nöbê├`\nò\"ê─cê┼╞!ç" [bibtex-inside-field bibtex-enclosing-field bibtex-text-in-field kill-region "\"\"" bibtex-find-text t] 3 "\ Delete the text part of the current field, replace with empty text" nil]) (fset 'bibtex-pop-previous #[(arg) "└ êè┴ ê\nö\nòöò─ bê╩╦╠!½å`╠G\\¬ü`{ \"╨=¼æ╤=¼ï╥ ê╙ö╙òbê╓e╫$½óöò{╙ò╙ö┌ êbê |ê cê¬ä█▄!ê.╨ëç" [bibtex-inside-field bibtex-enclosing-field bibtex-text-in-field bibtex-name-in-field nil new-text stop-name start-name stop-old-text start-old-text bibtex-cfield looking-at "OPT" bibtex-field-text matching-entry last-command bibtex-pop-previous bibtex-pop-next bibtex-enclosing-reference 0 bibtex-pop-previous-search-point bibtex-pop-next-search-point re-search-backward t arg bibtex-text-in-cfield bibtex-flash-head error "No previous matching BibTeX field." this-command] 5 "\ Replace text of current field with the text of similar field in previous entry. With arg, go up ARG entries. Repeated, goes up so many times. May be intermixed with \\[bibtex-pop-next] (bibtex-pop-next)." "p"]) (fset 'bibtex-pop-next #[(arg) "└ êè┴ ê\nö\nòöò─ bê╩╦╠!½å`╠G\\¬ü`{ \"╨=¼æ╤=¼ï╥ ê╙ö╙òbê╓d╫$½óöò{╙ò╙ö┌ êbê |ê cê¬ä█▄!ê.╨ëç" [bibtex-inside-field bibtex-enclosing-field bibtex-text-in-field bibtex-name-in-field nil new-text stop-name start-name stop-old-text start-old-text bibtex-cfield looking-at "OPT" bibtex-field-text matching-entry last-command bibtex-pop-next bibtex-pop-previous bibtex-enclosing-reference 0 bibtex-pop-previous-search-point bibtex-pop-next-search-point re-search-forward t arg bibtex-text-in-cfield bibtex-flash-head error "No next matching BibTeX field." this-command] 5 "\ Replace text of current field with the text of similar field in next entry. With arg, go up ARG entries. Repeated, goes up so many times. May be intermixed with \\[bibtex-pop-previous] (bibtex-pop-previous)." "p"]) (fset 'bibtex-flash-head #[nil "└┬e─#½è öbêò¬É└ê╟└xê`╚yê╟└wê╔`!½à╩╦!¬å╠═` {\")ç" [nil flash re-search-backward bibtex-reference-head t bibtex-type-in-head bibtex-key-in-reference " " 0 pos-visible-in-window-p sit-for 1 message "From: %s"] 4 "\ Flash at BibTeX reference head before point, if exists. (Moves point)."]) (fset 'bibtex-enclosing-field #[nil "└┴┬Åç" [errname (bibtex-enclosing-regexp bibtex-field) ((search-failed (error "Can't find enclosing BibTeX field.")))] 3 "\ Search for BibTeX field enclosing point. Point moves to end of field; also, use match-beginning and match-end to parse the field."]) (fset 'bibtex-enclosing-reference #[nil "└┴┬Åç" [errname (bibtex-enclosing-regexp bibtex-reference) ((search-failed (error "Can't find enclosing BibTeX reference.")))] 3 "\ Search for BibTeX reference enclosing point. Point moves to end of reference; also, use match-beginning and match-end to parse the reference."]) (fset 'bibtex-enclosing-regexp #[(regexp) "`┴\nd├#½ä─ò¬üdbê╞\ne├#½ä─ö¬üeëbê┴\n ╚╔$ê─öV½å╩╦\nC\"ê─òX¡ò┴\n ╚╔$ê─öV½m╩╦\nC\"ê¬e+ç" [initial re-search-forward regexp t 0 right re-search-backward left nil 1 signal search-failed] 6 "\ Search for REGEXP enclosing point. Point moves to end of REGEXP. See also match-beginning and match-end. If an enclosing REGEXP is not found, signals search-failed; point is left in an undefined location. [Doesn't something like this exist already?]" "sRegexp: "]) (fset 'bibtex-clean-entry #[nil "└ ê┴öbê`î\n┴ò}ê├d┼╞$⢠┴ö┴òöòöò \n bê╧╨!½á\nbê╧╤!½ê |ê¬╚bê╥╨G!êbê¬╣\nbê╧╙!½Ö bê╥╘!ê\nbê╥╞!ê bê╒uê¬ù╧╤!½Ä╞uê╓╫{\"ê¬ä bê.é )\nbê╪┘wê└ ê┴òbê┌┘w)ç" [bibtex-enclosing-reference 0 start re-search-forward bibtex-field t 1 bibtex-name-in-field bibtex-text-in-field end-text begin-text end-name begin-name end-field begin-field looking-at "OPT" "\"\"" delete-char "\"[0-9]+\"" -1 -2 error "Mandatory field ``%s'' is empty" "@a-zA-Z" nil " \n"] 6 "\ For all optional fields of current BibTeX entry: if empty, kill the whole field; otherwise, remove the \"OPT\" string in the name; if text numerical, remove double-quotes. For all mandatory fields: if empty, signal error." nil]) (fset 'bibtex-x-help #[(arg) "└ ┬\"ë¡â─!)ç" [x-popup-menu arg ("BibTeX commands" ("BibTeX entry 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) (" a chapter in a Book " . bibtex-InBook) (" an article in a Collection " . bibtex-InCollection) (" miscellaneous " . bibtex-Misc) (" unpublished " . bibtex-Unpublished) (" string " . bibtex-string)) ("Moving around and editing" (" next field " . bibtex-next-field) (" to end of field " . bibtex-find-text) ("snatch from similar preceding field" . bibtex-pop-previous) ("snatch from similar following field" . bibtex-pop-next) (" remove OPT " . bibtex-remove-OPT) (" remove quotes " . bibtex-remove-double-quotes) (" clean up entry " . bibtex-clean-entry)) ("help" (" describe BibTeX mode " . describe-mode))) selection call-interactively] 4 "\ Mouse commands for BibTeX mode"]) (fset 'bibtex-x-environment #[nil "└┴!ê┬┼#ç" [require x-mouse define-key mouse-map x-button-c-right bibtex-x-help] 4 "\ Set up X menus for BibTeX mode. Call it as bibtex-mode-hook, or interactively" nil]) (byte-code "└┴!½ä┬├!ê└ç" [fboundp defmenu eval (progn (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." (sun-menu-evaluate window (1+ x) (1- y) 'bibtex-sun-menu)) (defun bibtex-sun-environment nil "Set up sun menus for BibTeX mode. Call it as bibtex-mode-hook, or interactively" (interactive) (local-set-mouse '(text right) 'bibtex-sun-menu-eval)))] 2)