aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-22 02:05:30 +0000
committerRichard M. Stallman1997-08-22 02:05:30 +0000
commitf754fb7b941c6f3228be5e43e458ac862f699387 (patch)
treec1d583187887fff2dfb8428453f7cae0bfefece2
parente821c4f928d2addb05de491798758011bf99b4d5 (diff)
downloademacs-f754fb7b941c6f3228be5e43e458ac862f699387.tar.gz
emacs-f754fb7b941c6f3228be5e43e458ac862f699387.zip
Customized.
-rw-r--r--lisp/textmodes/bibtex.el305
1 files changed, 211 insertions, 94 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index a0113e444cc..ac76c7aaecb 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -45,37 +45,65 @@
45 45
46;; User Options: 46;; User Options:
47 47
48(defvar bibtex-mode-hook nil 48(defgroup bibtex nil
49 "List of functions to call on entry to BibTeX mode.") 49 "BibTeX mode."
50 50 :group 'tex
51(defvar bibtex-field-delimiters 'braces 51 :prefix "bibtex-")
52
53(defgroup bibtex-autokey nil
54 "Generates automatically a key from the author/editor and the title field"
55 :group 'bibtex
56 :prefix 'bibtex-autokey)
57
58(defcustom bibtex-mode-hook nil
59 "List of functions to call on entry to BibTeX mode."
60 :group 'bibtex
61 :type '(repeat function))
62
63(defcustom bibtex-field-delimiters 'braces
52 "*Controls type of field delimiters used. 64 "*Controls type of field delimiters used.
53Set this to 'braces or 'double-quotes according to your personal 65Set this to 'braces or 'double-quotes according to your personal
54preferences. This variable is buffer local.") 66preferences. This variable is buffer local."
67 :group 'bibtex
68 :type '(choice (const braces)
69 (const double-quotes)))
55(make-variable-buffer-local 'bibtex-field-delimiters) 70(make-variable-buffer-local 'bibtex-field-delimiters)
56 71
57(defvar bibtex-entry-delimiters 'braces 72(defcustom bibtex-entry-delimiters 'braces
58 "*Controls type of entry delimiters used. 73 "*Controls type of entry delimiters used.
59Set this to 'braces or 'parentheses according to your personal 74Set this to 'braces or 'parentheses according to your personal
60preferences. This variable is buffer local.") 75preferences. This variable is buffer local."
76 :group 'bibtex
77 :type '(choice (const braces)
78 (const parentheses)))
61(make-variable-buffer-local 'bibtex-entry-delimiters) 79(make-variable-buffer-local 'bibtex-entry-delimiters)
62 80
63(defvar bibtex-include-OPTcrossref '("InProceedings" "InCollection") 81(defcustom bibtex-include-OPTcrossref '("InProceedings" "InCollection")
64 "*All entries listed here will have an OPTcrossref field.") 82 "*All entries listed here will have an OPTcrossref field."
83 :group 'bibtex
84 :type '(repeat string))
65 85
66(defvar bibtex-include-OPTkey t 86(defcustom bibtex-include-OPTkey t
67 "*If non-nil, all entries will have an OPTkey field. 87 "*If non-nil, all entries will have an OPTkey field.
68If this is a string, it will be used as the initial field text. 88If this is a string, it will be used as the initial field text.
69If this is a function, it will be called to generate the initial field text.") 89If this is a function, it will be called to generate the initial field text."
70 90 :group 'bibtex
71(defvar bibtex-user-optional-fields 91 :type '(choice (const :tag "None" nil)
92 (const :tag "Default" t)
93 (string :tag "Initial text")
94 (function :tag "Initialize Function")))
95
96(defcustom bibtex-user-optional-fields
72 '(("annote" "Personal annotation (ignored)")) 97 '(("annote" "Personal annotation (ignored)"))
73 "*List of optional fields the user wants to have always present. 98 "*List of optional fields the user wants to have always present.
74Entries should be of the same form as the OPTIONAL and 99Entries should be of the same form as the OPTIONAL and
75CROSSREF-OPTIONAL lists in bibtex-entry-field-alist (see documentation 100CROSSREF-OPTIONAL lists in bibtex-entry-field-alist (see documentation
76of this variable for details).") 101of this variable for details)."
102 :group 'bibtex
103 :type '(repeat
104 (repeat string)))
77 105
78(defvar bibtex-entry-format '(opts-or-alts numerical-fields) 106(defcustom bibtex-entry-format '(opts-or-alts numerical-fields)
79 "*Controls type of formatting performed by bibtex-clean-entry. 107 "*Controls type of formatting performed by bibtex-clean-entry.
80It may be t, nil, or a list of symbols out of the following: 108It may be t, nil, or a list of symbols out of the following:
81'opts-or-alts (delete empty optional and alternative fields and 109'opts-or-alts (delete empty optional and alternative fields and
@@ -97,39 +125,55 @@ It may be t, nil, or a list of symbols out of the following:
97 bibtex-field-delimiters and bibtex-entry-delimiters) 125 bibtex-field-delimiters and bibtex-entry-delimiters)
98'unify-case (change case of entry and field names) 126'unify-case (change case of entry and field names)
99Value t means do all of the above formatting actions, 127Value t means do all of the above formatting actions,
100value nil means do no formatting at all.") 128value nil means do no formatting at all."
129 :group 'bibtex
130 :type '(choice (const :tag "None" nil)
131 (const :tag "All" t)
132 (repeat symbol)))
101 133
102(defvar bibtex-clean-entry-hook nil 134(defcustom bibtex-clean-entry-hook nil
103 "*List of functions to call when entry has been cleaned. 135 "*List of functions to call when entry has been cleaned.
104Functions are called with point inside the cleaned entry, buffer is 136Functions are called with point inside the cleaned entry, buffer is
105narrowed to just the entry.") 137narrowed to just the entry."
138 :group 'bibtex
139 :type '(repeat function))
106 140
107(defvar bibtex-sort-ignore-string-entries t 141(defcustom bibtex-sort-ignore-string-entries t
108 "*If non-nil, BibTeX @String entries are not sort-significant. 142 "*If non-nil, BibTeX @String entries are not sort-significant.
109That means they are ignored when determining ordering of the buffer 143That means they are ignored when determining ordering of the buffer
110(e.g. sorting, locating alphabetical position for new entries, etc.). 144(e.g. sorting, locating alphabetical position for new entries, etc.).
111This variable is buffer local.") 145This variable is buffer local."
146 :group 'bibtex
147 :type 'boolean)
112(make-variable-buffer-local 'bibtex-sort-ignore-string-entries) 148(make-variable-buffer-local 'bibtex-sort-ignore-string-entries)
113 149
114(defvar bibtex-maintain-sorted-entries nil 150(defcustom bibtex-maintain-sorted-entries nil
115 "*If non-nil, bibtex-mode maintains all BibTeX entries in sorted order. 151 "*If non-nil, bibtex-mode maintains all BibTeX entries in sorted order.
116Setting this variable to nil will strip off some comfort (e.g. TAB 152Setting this variable to nil will strip off some comfort (e.g. TAB
117completion for reference keys in minibuffer, automatic detection of 153completion for reference keys in minibuffer, automatic detection of
118duplicates) from bibtex-mode. See also bibtex-sort-ignore-string-entries. 154duplicates) from bibtex-mode. See also bibtex-sort-ignore-string-entries.
119This variable is buffer local.") 155This variable is buffer local."
156 :group 'bibtex
157 :type 'boolean)
120(make-variable-buffer-local 'bibtex-maintain-sorted-entries) 158(make-variable-buffer-local 'bibtex-maintain-sorted-entries)
121 159
122(defvar bibtex-field-kill-ring-max 20 160(defcustom bibtex-field-kill-ring-max 20
123 "*Maximum length of bibtex-field-kill-ring before oldest elements are deleted.") 161 "*Maximum length of bibtex-field-kill-ring before oldest elements are deleted."
162 :group 'bibtex
163 :type 'integer)
124 164
125(defvar bibtex-entry-kill-ring-max 20 165(defcustom bibtex-entry-kill-ring-max 20
126 "*Maximum length of bibtex-entry-kill-ring before oldest elements are deleted.") 166 "*Maximum length of bibtex-entry-kill-ring before oldest elements are deleted."
167 :group 'bibtex
168 :type 'integer)
127 169
128(defvar bibtex-parse-keys-timeout 60 170(defcustom bibtex-parse-keys-timeout 60
129 "*Specifies interval for parsing buffers. 171 "*Specifies interval for parsing buffers.
130All BibTeX buffers in emacs are parsed if emacs has been idle 172All BibTeX buffers in emacs are parsed if emacs has been idle
131`bibtex-parse-keys-timeout' seconds. Only buffers which were modified 173`bibtex-parse-keys-timeout' seconds. Only buffers which were modified
132after last parsing and which are maintained in sorted order are parsed.") 174after last parsing and which are maintained in sorted order are parsed."
175 :group 'bibtex
176 :type 'integer)
133 177
134(defvar bibtex-entry-field-alist 178(defvar bibtex-entry-field-alist
135 '( 179 '(
@@ -348,19 +392,24 @@ of the field, and ALTERNATIVE-FLAG (either nil or t) marks if the
348field is an alternative. ALTERNATIVE-FLAG may be t only in the 392field is an alternative. ALTERNATIVE-FLAG may be t only in the
349REQUIRED or CROSSREF-REQUIRED lists.") 393REQUIRED or CROSSREF-REQUIRED lists.")
350 394
351(defvar bibtex-add-entry-hook nil 395(defcustom bibtex-add-entry-hook nil
352 "List of functions to call when entry has been inserted.") 396 "List of functions to call when entry has been inserted."
397 :group 'bibtex
398 :type '(repeat function))
353 399
354(defvar bibtex-predefined-month-strings 400(defcustom bibtex-predefined-month-strings
355 '( 401 '(
356 ("jan") ("feb") ("mar") ("apr") ("may") ("jun") 402 ("jan") ("feb") ("mar") ("apr") ("may") ("jun")
357 ("jul") ("aug") ("sep") ("oct") ("nov") ("dec") 403 ("jul") ("aug") ("sep") ("oct") ("nov") ("dec")
358 ) 404 )
359 "Alist of month string definitions. 405 "Alist of month string definitions.
360Should contain all strings used for months in the BibTeX style files. 406Should contain all strings used for months in the BibTeX style files.
361Each element is a list with just one element: the string.") 407Each element is a list with just one element: the string."
408 :group 'bibtex
409 :type '(repeat
410 (list string)))
362 411
363(defvar bibtex-predefined-strings 412(defcustom bibtex-predefined-strings
364 (append 413 (append
365 bibtex-predefined-month-strings 414 bibtex-predefined-month-strings
366 '( 415 '(
@@ -371,39 +420,54 @@ Each element is a list with just one element: the string.")
371 )) 420 ))
372 "Alist of string definitions. 421 "Alist of string definitions.
373Should contain the strings defined in the BibTeX style files. Each 422Should contain the strings defined in the BibTeX style files. Each
374element is a list with just one element: the string.") 423element is a list with just one element: the string."
424 :group 'bibtex
425 :type '(repeat
426 (list string)))
375 427
376(defvar bibtex-string-files nil 428(defcustom bibtex-string-files nil
377 "*List of BibTeX files containing string definitions. 429 "*List of BibTeX files containing string definitions.
378Those files must be specified using pathnames relative to the 430Those files must be specified using pathnames relative to the
379directories specified in bibtex-string-file-path. This variable is only 431directories specified in bibtex-string-file-path. This variable is only
380evaluated when bibtex-mode is entered (i. e. when loading the BibTeX 432evaluated when bibtex-mode is entered (i. e. when loading the BibTeX
381file).") 433file)."
434 :group 'bibtex
435 :type '(repeat file))
382 436
383(defvar bibtex-string-file-path (getenv "BIBINPUTS") 437(defvar bibtex-string-file-path (getenv "BIBINPUTS")
384 "*Colon separated list of pathes to search for bibtex-string-files.") 438 "*Colon separated list of pathes to search for bibtex-string-files.")
385 439
386(defvar bibtex-help-message t 440(defcustom bibtex-help-message t
387 "*If not nil print help messages in the echo area on entering a new field.") 441 "*If not nil print help messages in the echo area on entering a new field."
442 :group 'bibtex
443 :type 'boolean)
388 444
389(defvar bibtex-autokey-prefix-string "" 445(defcustom bibtex-autokey-prefix-string ""
390 "*String to use as a prefix for all generated keys. 446 "*String to use as a prefix for all generated keys.
391See the documentation of function bibtex-generate-autokey for further detail.") 447See the documentation of function bibtex-generate-autokey for further detail."
448 :group 'bibtex-autokey
449 :type 'string)
392 450
393(defvar bibtex-autokey-names 1 451(defcustom bibtex-autokey-names 1
394 "*Number of names to use for the automatically generated reference key. 452 "*Number of names to use for the automatically generated reference key.
395If this is set to anything but a number, all names are used. 453If this is set to anything but a number, all names are used.
396Possibly more names are used according to bibtex-autokey-names-stretch. 454Possibly more names are used according to bibtex-autokey-names-stretch.
397See the documentation of function bibtex-generate-autokey for further detail.") 455See the documentation of function bibtex-generate-autokey for further detail."
456 :group 'bibtex-autokey
457 :type 'integer)
398 458
399(defvar bibtex-autokey-names-stretch 0 459(defcustom bibtex-autokey-names-stretch 0
400 "*Number of names that can additionally be used. 460 "*Number of names that can additionally be used.
401These names are used only, if all names are used then. 461These names are used only, if all names are used then.
402See the documentation of function bibtex-generate-autokey for details.") 462See the documentation of function bibtex-generate-autokey for details."
463 :group 'bibtex-autokey
464 :type 'integer)
403 465
404(defvar bibtex-autokey-additional-names "" 466(defcustom bibtex-autokey-additional-names ""
405 "*String to prepend to the generated key if not all names could be used. 467 "*String to prepend to the generated key if not all names could be used.
406See the documentation of function bibtex-generate-autokey for details.") 468See the documentation of function bibtex-generate-autokey for details."
469 :group 'bibtex-autokey
470 :type 'string)
407 471
408(defvar bibtex-autokey-transcriptions 472(defvar bibtex-autokey-transcriptions
409 '( 473 '(
@@ -431,132 +495,185 @@ bibtex-autokey-titleword-change-strings. Defaults to translating some
431language specific characters to their ascii transcriptions and 495language specific characters to their ascii transcriptions and
432removing any character accents.") 496removing any character accents.")
433 497
434(defvar bibtex-autokey-name-change-strings 498(defcustom bibtex-autokey-name-change-strings
435 bibtex-autokey-transcriptions 499 bibtex-autokey-transcriptions
436 "Alist of (old-regexp new-string) pairs. 500 "Alist of (old-regexp new-string) pairs.
437Any part of name matching a old-regexp is replaced by new-string. 501Any part of name matching a old-regexp is replaced by new-string.
438Case of the old-regexp is significant. All regexps are tried in the 502Case of the old-regexp is significant. All regexps are tried in the
439order in which they appear in the list, so be sure to avoid inifinite 503order in which they appear in the list, so be sure to avoid inifinite
440loops here. 504loops here.
441See the documentation of function bibtex-generate-autokey for details.") 505See the documentation of function bibtex-generate-autokey for details."
506 :group 'bibtex-autokey
507 :type '(repeat
508 (list (regexp :tag "Old")
509 (string :tag "New"))))
442 510
443(defvar bibtex-autokey-name-length 'infty 511(defcustom bibtex-autokey-name-length 'infty
444 "*Number of characters from name to incorporate into key. 512 "*Number of characters from name to incorporate into key.
445If this is set to anything but a number, all characters are used. 513If this is set to anything but a number, all characters are used.
446See the documentation of function bibtex-generate-autokey for details.") 514See the documentation of function bibtex-generate-autokey for details."
515 :group 'bibtex-autokey
516 :type '(choice (const :tag "All" infty)
517 integer))
447 518
448(defvar bibtex-autokey-name-separator "" 519(defcustom bibtex-autokey-name-separator ""
449 "*String that comes between any two names in the key. 520 "*String that comes between any two names in the key.
450See the documentation of function bibtex-generate-autokey for details.") 521See the documentation of function bibtex-generate-autokey for details."
522 :group 'bibtex-autokey
523 :type 'string)
451 524
452(defvar bibtex-autokey-year-length 2 525(defcustom bibtex-autokey-year-length 2
453 "*Number of rightmost digits from the year field yo incorporate into key. 526 "*Number of rightmost digits from the year field yo incorporate into key.
454See the documentation of function bibtex-generate-autokey for details.") 527See the documentation of function bibtex-generate-autokey for details."
528 :group 'bibtex-autokey
529 :type 'integer)
455 530
456(defvar bibtex-autokey-year-use-crossref-entry t 531(defcustom bibtex-autokey-year-use-crossref-entry t
457 "*If non-nil use year field from crossreferenced entry if necessary. 532 "*If non-nil use year field from crossreferenced entry if necessary.
458If this variable is non-nil and the current entry has no year, but a 533If this variable is non-nil and the current entry has no year, but a
459valid crossref entry, the year field from the crossreferenced entry is 534valid crossref entry, the year field from the crossreferenced entry is
460used. 535used.
461See the documentation of function bibtex-generate-autokey for details.") 536See the documentation of function bibtex-generate-autokey for details."
537 :group 'bibtex-autokey
538 :type 'boolean)
462 539
463(defvar bibtex-autokey-titlewords 5 540(defcustom bibtex-autokey-titlewords 5
464 "*Number of title words to use for the automatically generated reference key. 541 "*Number of title words to use for the automatically generated reference key.
465If this is set to anything but a number, all title words are used. 542If this is set to anything but a number, all title words are used.
466Possibly more words from the title are used according to 543Possibly more words from the title are used according to
467bibtex-autokey-titlewords-stretch. 544bibtex-autokey-titlewords-stretch.
468See the documentation of function bibtex-generate-autokey for details.") 545See the documentation of function bibtex-generate-autokey for details."
546 :group 'bibtex-autokey
547 :type '(choice (const :tag "All" infty)
548 integer))
469 549
470(defvar bibtex-autokey-title-terminators 550(defcustom bibtex-autokey-title-terminators
471 '("\\." "!" "\\?" ":" ";" "--") 551 '("\\." "!" "\\?" ":" ";" "--")
472 "*Regexp list defining the termination of the main part of the title. 552 "*Regexp list defining the termination of the main part of the title.
473Case of the regexps is ignored. 553Case of the regexps is ignored.
474See the documentation of function bibtex-generate-autokey for details.") 554See the documentation of function bibtex-generate-autokey for details."
555 :group 'bibtex-autokey
556 :type '(repeat regexp))
475 557
476(defvar bibtex-autokey-titlewords-stretch 2 558(defcustom bibtex-autokey-titlewords-stretch 2
477 "*Number of words that can additionally be used from the title. 559 "*Number of words that can additionally be used from the title.
478These words are used only, if a sentence from the title can be ended then. 560These words are used only, if a sentence from the title can be ended then.
479See the documentation of function bibtex-generate-autokey for details.") 561See the documentation of function bibtex-generate-autokey for details."
562 :group 'bibtex-autokey
563 :type 'integer)
480 564
481(defvar bibtex-autokey-titleword-first-ignore 565(defcustom bibtex-autokey-titleword-first-ignore
482 '("a" "an" "on" "the" "eine?" "der" "die" "das") 566 '("a" "an" "on" "the" "eine?" "der" "die" "das")
483 "*Determines words that may begin a title but are not to be used in the key. 567 "*Determines words that may begin a title but are not to be used in the key.
484Each item of the list is a regexp. If the first word of the title matchs a 568Each item of the list is a regexp. If the first word of the title matchs a
485regexp from that list, it is not included in the title, even if it is 569regexp from that list, it is not included in the title, even if it is
486capitalized. Case of regexps in this list doesn't matter. 570capitalized. Case of regexps in this list doesn't matter.
487See the documentation of function bibtex-generate-autokey for details.") 571See the documentation of function bibtex-generate-autokey for details."
572 :group 'bibtex-autokey
573 :type '(repeat regexp))
488 574
489(defvar bibtex-autokey-titleword-abbrevs nil 575(defcustom bibtex-autokey-titleword-abbrevs nil
490 "*Determines exceptions to the usual abbreviation mechanism. 576 "*Determines exceptions to the usual abbreviation mechanism.
491An alist of (old-regexp new-string) pairs. Case of old-regexp ignored. 577An alist of (old-regexp new-string) pairs. Case of old-regexp ignored.
492The first matching pair is used. 578The first matching pair is used.
493See the documentation of function bibtex-generate-autokey for details.") 579See the documentation of function bibtex-generate-autokey for details.")
494 580
495(defvar bibtex-autokey-titleword-change-strings 581(defcustom bibtex-autokey-titleword-change-strings
496 bibtex-autokey-transcriptions 582 bibtex-autokey-transcriptions
497 "Alist of (old-regexp new-string) pairs. 583 "Alist of (old-regexp new-string) pairs.
498Any part of title word matching a old-regexp is replaced by new-string. 584Any part of title word matching a old-regexp is replaced by new-string.
499Case of the old-regexp is significant. All regexps are tried in the 585Case of the old-regexp is significant. All regexps are tried in the
500order in which they appear in the list, so be sure to avoid inifinite 586order in which they appear in the list, so be sure to avoid inifinite
501loops here. 587loops here.
502See the documentation of function bibtex-generate-autokey for details.") 588See the documentation of function bibtex-generate-autokey for details."
589 :group 'bibtex-autokey
590 :type '(repeat
591 (list (regexp :tag "Old")
592 (string :tag "New"))))
503 593
504(defvar bibtex-autokey-titleword-length 5 594(defcustom bibtex-autokey-titleword-length 5
505 "*Number of characters from title words to incorporate into key. 595 "*Number of characters from title words to incorporate into key.
506If this is set to anything but a number, all characters are used. 596If this is set to anything but a number, all characters are used.
507See the documentation of function bibtex-generate-autokey for details.") 597See the documentation of function bibtex-generate-autokey for details."
598 :group 'bibtex-autokey
599 :type '(choice (const :tag "All" infty)
600 integer))
508 601
509(defvar bibtex-autokey-titleword-separator "_" 602(defcustom bibtex-autokey-titleword-separator "_"
510 "*String to be put between the title words. 603 "*String to be put between the title words.
511See the documentation of function bibtex-generate-autokey for details.") 604See the documentation of function bibtex-generate-autokey for details."
605 :group 'bibtex-autokey
606 :type 'string)
512 607
513(defvar bibtex-autokey-name-year-separator "" 608(defcustom bibtex-autokey-name-year-separator ""
514 "*String to be put between name part and year part of key. 609 "*String to be put between name part and year part of key.
515See the documentation of function bibtex-generate-autokey for details.") 610See the documentation of function bibtex-generate-autokey for details."
611 :group 'bibtex-autokey
612 :type 'string)
516 613
517(defvar bibtex-autokey-year-title-separator ":_" 614(defcustom bibtex-autokey-year-title-separator ":_"
518 "*String to be put between name part and year part of key. 615 "*String to be put between name part and year part of key.
519See the documentation of function bibtex-generate-autokey for details.") 616See the documentation of function bibtex-generate-autokey for details."
617 :group 'bibtex-autokey
618 :type 'string)
520 619
521(defvar bibtex-autokey-preserve-case nil 620(defcustom bibtex-autokey-preserve-case nil
522 "*If non-nil, names and titlewords used aren't converted to lowercase. 621 "*If non-nil, names and titlewords used aren't converted to lowercase.
523See the documentation of function bibtex-generate-autokey for details.") 622See the documentation of function bibtex-generate-autokey for details."
623 :group 'bibtex-autokey
624 :type 'boolean)
524 625
525(defvar bibtex-autokey-edit-before-use t 626(defcustom bibtex-autokey-edit-before-use t
526 "*If non-nil, user is allowed to edit the generated key before it is used.") 627 "*If non-nil, user is allowed to edit the generated key before it is used."
628 :group 'bibtex-autokey
629 :type 'boolean)
527 630
528(defvar bibtex-autokey-before-presentation-hook nil 631(defcustom bibtex-autokey-before-presentation-hook nil
529 "Function to call before the generated key is presented. 632 "Function to call before the generated key is presented.
530If non-nil this should be a single function, which is called before 633If non-nil this should be a single function, which is called before
531the generated key is presented (in entry or, if 634the generated key is presented (in entry or, if
532`bibtex-autokey-edit-before-use' is t, in minibuffer). This function 635`bibtex-autokey-edit-before-use' is t, in minibuffer). This function
533must take one argument (the automatically generated key), and must 636must take one argument (the automatically generated key), and must
534return with a string (the key to use).") 637return with a string (the key to use)."
638 :group 'bibtex-autokey
639 :type 'function)
535 640
536(defvar bibtex-entry-offset 0 641(defcustom bibtex-entry-offset 0
537 "*Offset for BibTeX entries. 642 "*Offset for BibTeX entries.
538Added to the value of all other variables which determine colums.") 643Added to the value of all other variables which determine colums."
644 :group 'bibtex
645 :type 'integer)
539 646
540(defvar bibtex-field-indentation 2 647(defcustom bibtex-field-indentation 2
541 "*Starting column for the name part in BibTeX fields.") 648 "*Starting column for the name part in BibTeX fields."
649 :group 'bibtex
650 :type 'integer)
542 651
543(defvar bibtex-text-indentation 652(defcustom bibtex-text-indentation
544 (+ 653 (+
545 bibtex-field-indentation 654 bibtex-field-indentation
546 (length "organization = ")) 655 (length "organization = "))
547 "*Starting column for the text part in BibTeX fields. 656 "*Starting column for the text part in BibTeX fields.
548Should be equal to the space needed for the longest name part.") 657Should be equal to the space needed for the longest name part."
658 :group 'bibtex
659 :type 'integer)
549 660
550(defvar bibtex-contline-indentation 661(defcustom bibtex-contline-indentation
551 (+ bibtex-text-indentation 1) 662 (+ bibtex-text-indentation 1)
552 "*Starting column for continuation lines of BibTeX fields.") 663 "*Starting column for continuation lines of BibTeX fields."
664 :group 'bibtex
665 :type 'integer)
553 666
554(defvar bibtex-align-at-equal-sign nil 667(defcustom bibtex-align-at-equal-sign nil
555 "*If non-nil, align fields at equal sign instead of field text. 668 "*If non-nil, align fields at equal sign instead of field text.
556If non nil, column of equal sign is bibtex-text-indentation - 2.") 669If non nil, column of equal sign is bibtex-text-indentation - 2."
557 670 :group 'bibtex
558(defvar bibtex-comma-after-last-field nil 671 :type 'boolean)
559 "*If non-nil, a comma is put at end of last field in the entry template.") 672
673(defcustom bibtex-comma-after-last-field nil
674 "*If non-nil, a comma is put at end of last field in the entry template."
675 :group 'bibtex
676 :type 'boolean)
560 677
561;; bibtex-font-lock-keywords is a user option as well, but since the 678;; bibtex-font-lock-keywords is a user option as well, but since the
562;; patterns used to define this variable are defined in a later 679;; patterns used to define this variable are defined in a later