;ELC ;;; Compiled ;;; in Emacs version 27.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301\302\303\304\305\306\307\306\310& \210\311\312\313\314\315\316\306\301&\210\311\317\320\321\315\316\306\301&\207" [custom-declare-group bib nil "Major mode for editing bib files." :prefix "bib-" :group external text custom-declare-variable bib-file "~/my-bibliography.bib" "Default name of file used by `addbib'." :type file unread-bib-file "~/to-be-read.bib" "Default name of file used by `unread-bib' in Bib mode."] 10) (defvar bib-mode-map (byte-code "\302 \303 \"\210\304\305\306#\210\304\307\310#\210\304\311\312#\210\304\313\314#\210)\207" [map text-mode-map make-sparse-keymap set-keymap-parent 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 (#$ . 1122) nil]) (defvar bib-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [bib-mode-hook variable-documentation put "Hook run after 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] 4) (defvar bib-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [bib-mode-abbrev-table bib-mode-map variable-documentation put purecopy "Keymap for `bib-mode'." boundp bib-mode-syntax-table definition-name bib-mode (lambda (#1=#:def-tmp-var) (defvar bib-mode-syntax-table #1#)) make-syntax-table "Syntax table for `bib-mode'." (lambda (#1#) (defvar bib-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `bib-mode'." 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\325\"\204V=\204V\326\325C#\210\327 !\210\330\f!\210\331\332!\210)\333\334!\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 abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table abbrev-mode 1 run-mode-hooks bib-mode-hook bib-mode-abbrev-table local-abbrev-table] 6 (#$ . 2446) 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 ")) (#$ . 4321)) (defalias 'bib-find-key #[(slots) "\204o\203\n\302\207\303y\210\304 !\207\305@@!\203@A\207\304A!\207" [slots bib-assoc "" -1 bib-find-key looking-at] 2]) #@66 True to automatically capitalize appropriate fields in Bib mode. (custom-declare-variable 'bib-auto-capitalize t '(#$ . 4977) :type 'boolean :group 'bib) (defconst bib-capitalized-fields "%[AETCBIJR]") #@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 (#$ . 5185) 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\312y\210\300\301!\207" [beginning-of-line nil looking-at "^ *$" re-search-backward "[^ \n]" 2 re-search-forward "^%" push-mark 1] 4 (#$ . 5715) 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 (#$ . 6095) 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\\|for\\|in\\|to\\|on\\|at\\|by\\|with\\|that\\|its" (#$ . 6385)) (defvar bib-capitalize-title-stop-regexp (concat "\\(" bib-capitalize-title-stop-words "\\)\\(\\b\\|'\\)")) #@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 #[nil "\301!\207" [orig-syntax-table set-syntax-table] 2] set-syntax-table looking-at "[A-Z][a-z]*[A-Z]" 1 capitalize-word re-search-forward "\\<" t downcase-word] 4 (#$ . 6698) "r"]) #@71 Like `capitalize', but don't capitalize stop words, except the first. (defalias 'bib-capitalize-title #[(s) "r\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 (#$ . 7346)]) (provide 'bib-mode)