Mercurial > emacs
comparison lisp/textmodes/bib-mode.el @ 20959:9b831f34ff7d
Customized.
author | Stephen Eglen <stephen@gnu.org> |
---|---|
date | Sun, 22 Feb 1998 17:34:42 +0000 |
parents | 0aa65f31f7e4 |
children | 253f761ad37b |
comparison
equal
deleted
inserted
replaced
20958:806727604be8 | 20959:9b831f34ff7d |
---|---|
28 ;; refer and lookbib. The file bib-file should be set to your | 28 ;; refer and lookbib. The file bib-file should be set to your |
29 ;; bibliography file. Keys are automagically inserted as you type, | 29 ;; bibliography file. Keys are automagically inserted as you type, |
30 ;; and appropriate keys are presented for various kinds of entries. | 30 ;; and appropriate keys are presented for various kinds of entries. |
31 | 31 |
32 ;;; Code: | 32 ;;; Code: |
33 | 33 (defgroup bib nil |
34 (defvar bib-file "~/my-bibliography.bib" | 34 "Major mode for editing bib files." |
35 "Default name of file used by `addbib'.") | 35 :prefix "bib-" |
36 | 36 :group 'wp) |
37 (defvar unread-bib-file "~/to-be-read.bib" | 37 |
38 "Default name of file used by `unread-bib' in Bib mode.") | 38 (defcustom bib-file "~/my-bibliography.bib" |
39 "Default name of file used by `addbib'." | |
40 :type 'file | |
41 :group 'bib) | |
42 | |
43 (defcustom unread-bib-file "~/to-be-read.bib" | |
44 "Default name of file used by `unread-bib' in Bib mode." | |
45 :type 'file | |
46 :group 'bib) | |
39 | 47 |
40 (defvar bib-mode-map (copy-keymap text-mode-map)) | 48 (defvar bib-mode-map (copy-keymap text-mode-map)) |
41 (define-key bib-mode-map "\C-M" 'return-key-bib) | 49 (define-key bib-mode-map "\C-M" 'return-key-bib) |
42 (define-key bib-mode-map "\C-c\C-u" 'unread-bib) | 50 (define-key bib-mode-map "\C-c\C-u" 'unread-bib) |
43 (define-key bib-mode-map "\C-c\C-@" 'mark-bib) | 51 (define-key bib-mode-map "\C-c\C-@" 'mark-bib) |
135 (cdr (car slots))) | 143 (cdr (car slots))) |
136 (t (bib-find-key (cdr slots))) | 144 (t (bib-find-key (cdr slots))) |
137 )) | 145 )) |
138 | 146 |
139 | 147 |
140 (defvar bib-auto-capitalize t | 148 (defcustom bib-auto-capitalize t |
141 "*True to automatically capitalize appropriate fields in Bib mode.") | 149 "*True to automatically capitalize appropriate fields in Bib mode." |
150 :type 'boolean | |
151 :group 'bib) | |
142 | 152 |
143 (defconst bib-capitalized-fields "%[AETCBIJR]") | 153 (defconst bib-capitalized-fields "%[AETCBIJR]") |
144 | 154 |
145 (defun return-key-bib () | 155 (defun return-key-bib () |
146 "Magic when user hits return, used by `bib-mode'." | 156 "Magic when user hits return, used by `bib-mode'." |