;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:25:15 2007 ;;; from file /home/cyd/emacs/lisp/textmodes/bib-mode.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (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 "`bib-mode.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-declare-group 'bib nil "Major mode for editing bib files." :prefix "bib-" :group 'external :group 'wp) #@40 Default name of file used by `addbib'. (custom-declare-variable 'bib-file '"~/my-bibliography.bib" '(#$ . 684) :type 'file :group 'bib) #@56 Default name of file used by `unread-bib' in Bib mode. (custom-declare-variable 'unread-bib-file '"~/to-be-read.bib" '(#$ . 826) :type 'file :group 'bib) (byte-code "\302B\303\302!\204\304\302\305 !\"\210\306\n\307\310#\210\306\n\311\312#\210\306\n\313\314#\210\306\n\315\316#\207" [current-load-list text-mode-map bib-mode-map default-boundp set-default copy-keymap define-key " " return-key-bib "" unread-bib "" mark-bib "`" abbrev-mode] 4) #@122 Set up editor to add to troff bibliography file specified by global variable `bib-file'. See description of `bib-mode'. (defalias 'addbib #[nil "\301!\210db\210\302 \207" [bib-file find-file bib-mode] 2 (#$ . 1285) nil]) (byte-code "\302\303N\204\f\304\302\303\305#\210\306\307!\204\304\307\310\311#\210\307B\312\307!\204(\313\307\314 \"\210\306\315!\2044\304\315\310\311#\210\315B\312\315!\204D\313\315\316 \"\210\304\301\310\311#\210\301B\312\301!\204^\313\301\317\301\320\"\210 \"\210\304\311\321\322#\207" [current-load-list bib-mode-abbrev-table bib-mode-hook variable-documentation put "Hook run when entering Bib mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp bib-mode-map definition-name bib-mode default-boundp set-default make-sparse-keymap bib-mode-syntax-table make-syntax-table define-abbrev-table nil derived-mode-parent text-mode] 5) #@1139 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 this feature 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} (defalias 'bib-mode #[nil "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2036 \321 =\203<\322\f\323 \"\210)\324 !\210\325\f!\210\326\327!\210)\330\331!\203X\331\332!\207\333\332!\207" [delay-mode-hooks major-mode mode-name bib-mode-map bib-mode-syntax-table parent make-local-variable t text-mode bib-mode "Bib" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table use-local-map set-syntax-table abbrev-mode 1 fboundp run-mode-hooks bib-mode-hook run-hooks bib-mode-abbrev-table local-abbrev-table] 6 (#$ . 2251) nil]) #@127 Describes bibliographic database format. A line beginning with the car of an entry is followed by one beginning with the cdr. (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 ")) (#$ . 4082)) (defalias 'bib-find-key #[(slots) "\204o\203\n\302\207\303\304!\210\305 !\207\306@@!\203@A\207\305A!\207" [slots bib-assoc "" previous-line 1 bib-find-key looking-at] 2]) #@67 *True to automatically capitalize appropriate fields in Bib mode. (custom-declare-variable 'bib-auto-capitalize 't '(#$ . -4755) :type 'boolean :group 'bib) (byte-code "\301B\302\303!\207" [current-load-list bib-capitalized-fields (lambda (#1=#:defconst-tmp-var) (defconst bib-capitalized-fields #1#)) "%[AETCBIJR]"] 2) #@50 Magic when user hits return, used by `bib-mode'. (defalias 'return-key-bib #[nil "l\203[\306\211\211\211\307 \210\310\311!\211\204 \306\210\312 \210\313y\210\306\210`\307 \210`\314\f! \204F \203F\310!\203F\212\315`\316\\\"\210) b\210 \203T\317\306!\210\202W\320y\210\nc,\207\312 \207" [end-current beg-current new-key empty bib-assoc bib-auto-capitalize nil beginning-of-line looking-at "%. $" newline -1 bib-find-key bib-capitalize-title-region 3 kill-line 1 bib-capitalized-fields] 5 (#$ . 5083) nil]) #@71 Set mark at beginning of current or previous bib entry, point at end. (defalias 'mark-bib #[nil "\300\301!\210\302\303!\203\304\305\301\306#\210\304\303\301\306#\210\307\310!\210\300\301!\210\311`!\210\307\303\301\306#\210\312\313!\210\300\301!\207" [beginning-of-line nil looking-at "^ *$" re-search-backward "[^ \n]" 2 re-search-forward "^%" push-mark next-line 1] 4 (#$ . 5613) nil]) #@96 Append current or previous entry to file of unread papers named by variable `unread-bib-file'. (defalias 'unread-bib #[nil "\301 \210\302!\203\303\302!\304 `#\207\305\304 `#\207" [unread-bib-file mark-bib get-file-buffer append-to-buffer mark append-to-file] 4 (#$ . 6008) nil]) #@65 Words not to be capitalized in a title (unless the first word). (defvar bib-capitalize-title-stop-words "the\\|and\\|of\\|is\\|a\\|an\\|of\\|for\\|in\\|to\\|in\\|on\\|at\\|by\\|with\\|that\\|its" (#$ . 6298)) (byte-code "\302B\303\302!\204\304\302\305 \306Q\"\210\302\207" [current-load-list bib-capitalize-title-stop-words bib-capitalize-title-stop-regexp default-boundp set-default "\\(" "\\)\\(\\b\\|'\\)"] 5) #@78 Like `capitalize-region', but don't capitalize stop words, except the first. (defalias 'bib-capitalize-title-region #[(begin end) "\306\307 \310\216\214\311\n!\210 \f}\210eb\210\312\313!\203\314v\210\202#\315\314!\210\316\317\306\320#\205N\312\313!\2037\314v\210\202#\320\312 !)\203G\321\314!\210\202#\315\314!\210\202#,\207" [orig-syntax-table case-fold-search text-mode-syntax-table begin end bib-capitalize-title-stop-regexp nil syntax-table ((set-syntax-table orig-syntax-table)) set-syntax-table looking-at "[A-Z][a-z]*[A-Z]" 1 capitalize-word re-search-forward "\\<" t downcase-word] 4 (#$ . 6721) "r"]) #@71 Like `capitalize', but don't capitalize stop words, except the first. (defalias 'bib-capitalize-title #[(s) "\212\301\302!q\210\303 \210c\210\304ed\"\210\305 )\207" [s get-buffer-create "$$$Scratch$$$" erase-buffer bib-capitalize-title-region buffer-string] 3 (#$ . 7349)]) (provide 'bib-mode)