comparison lisp/textmodes/bibtex.el @ 19460:f15d80b084d8

Customized.
author Richard M. Stallman <rms@gnu.org>
date Fri, 22 Aug 1997 02:05:30 +0000
parents 708870732e5d
children 6b67f20dd710
comparison
equal deleted inserted replaced
19459:4a7041bb28d2 19460:f15d80b084d8
43 (eval-when-compile 43 (eval-when-compile
44 (require 'compile)) 44 (require 'compile))
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.
53 Set this to 'braces or 'double-quotes according to your personal 65 Set this to 'braces or 'double-quotes according to your personal
54 preferences. This variable is buffer local.") 66 preferences. 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.
59 Set this to 'braces or 'parentheses according to your personal 74 Set this to 'braces or 'parentheses according to your personal
60 preferences. This variable is buffer local.") 75 preferences. 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."
65 83 :group 'bibtex
66 (defvar bibtex-include-OPTkey t 84 :type '(repeat string))
85
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.
68 If this is a string, it will be used as the initial field text. 88 If this is a string, it will be used as the initial field text.
69 If this is a function, it will be called to generate the initial field text.") 89 If 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.
74 Entries should be of the same form as the OPTIONAL and 99 Entries should be of the same form as the OPTIONAL and
75 CROSSREF-OPTIONAL lists in bibtex-entry-field-alist (see documentation 100 CROSSREF-OPTIONAL lists in bibtex-entry-field-alist (see documentation
76 of this variable for details).") 101 of this variable for details)."
77 102 :group 'bibtex
78 (defvar bibtex-entry-format '(opts-or-alts numerical-fields) 103 :type '(repeat
104 (repeat string)))
105
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.
80 It may be t, nil, or a list of symbols out of the following: 108 It 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
82 remove OPT and ALT prefixes from used fields) 110 remove OPT and ALT prefixes from used fields)
83 'numerical-fields (delete delimiters around numeral fields) 111 'numerical-fields (delete delimiters around numeral fields)
95 depending on the value of bibtex-comma-after-last-field) 123 depending on the value of bibtex-comma-after-last-field)
96 'delimiters (change delimiters according to variables 124 'delimiters (change delimiters according to variables
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)
99 Value t means do all of the above formatting actions, 127 Value t means do all of the above formatting actions,
100 value nil means do no formatting at all.") 128 value nil means do no formatting at all."
101 129 :group 'bibtex
102 (defvar bibtex-clean-entry-hook nil 130 :type '(choice (const :tag "None" nil)
131 (const :tag "All" t)
132 (repeat symbol)))
133
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.
104 Functions are called with point inside the cleaned entry, buffer is 136 Functions are called with point inside the cleaned entry, buffer is
105 narrowed to just the entry.") 137 narrowed to just the entry."
106 138 :group 'bibtex
107 (defvar bibtex-sort-ignore-string-entries t 139 :type '(repeat function))
140
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.
109 That means they are ignored when determining ordering of the buffer 143 That 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.).
111 This variable is buffer local.") 145 This 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.
116 Setting this variable to nil will strip off some comfort (e.g. TAB 152 Setting this variable to nil will strip off some comfort (e.g. TAB
117 completion for reference keys in minibuffer, automatic detection of 153 completion for reference keys in minibuffer, automatic detection of
118 duplicates) from bibtex-mode. See also bibtex-sort-ignore-string-entries. 154 duplicates) from bibtex-mode. See also bibtex-sort-ignore-string-entries.
119 This variable is buffer local.") 155 This 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."
124 162 :group 'bibtex
125 (defvar bibtex-entry-kill-ring-max 20 163 :type 'integer)
126 "*Maximum length of bibtex-entry-kill-ring before oldest elements are deleted.") 164
127 165 (defcustom bibtex-entry-kill-ring-max 20
128 (defvar bibtex-parse-keys-timeout 60 166 "*Maximum length of bibtex-entry-kill-ring before oldest elements are deleted."
167 :group 'bibtex
168 :type 'integer)
169
170 (defcustom bibtex-parse-keys-timeout 60
129 "*Specifies interval for parsing buffers. 171 "*Specifies interval for parsing buffers.
130 All BibTeX buffers in emacs are parsed if emacs has been idle 172 All 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
132 after last parsing and which are maintained in sorted order are parsed.") 174 after 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 '(
136 ("Article" . (((("author" "Author1 [and Author2 ...] [and others]") 180 ("Article" . (((("author" "Author1 [and Author2 ...] [and others]")
137 ("title" "Title of the article (BibTeX converts it to lowercase)") 181 ("title" "Title of the article (BibTeX converts it to lowercase)")
346 field or a function, which is called to determine the initial content 390 field or a function, which is called to determine the initial content
347 of the field, and ALTERNATIVE-FLAG (either nil or t) marks if the 391 of the field, and ALTERNATIVE-FLAG (either nil or t) marks if the
348 field is an alternative. ALTERNATIVE-FLAG may be t only in the 392 field is an alternative. ALTERNATIVE-FLAG may be t only in the
349 REQUIRED or CROSSREF-REQUIRED lists.") 393 REQUIRED 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."
353 397 :group 'bibtex
354 (defvar bibtex-predefined-month-strings 398 :type '(repeat function))
399
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.
360 Should contain all strings used for months in the BibTeX style files. 406 Should contain all strings used for months in the BibTeX style files.
361 Each element is a list with just one element: the string.") 407 Each element is a list with just one element: the string."
362 408 :group 'bibtex
363 (defvar bibtex-predefined-strings 409 :type '(repeat
410 (list string)))
411
412 (defcustom bibtex-predefined-strings
364 (append 413 (append
365 bibtex-predefined-month-strings 414 bibtex-predefined-month-strings
366 '( 415 '(
367 ("acmcs") ("acta") ("cacm") ("ibmjrd") ("ibmsj") ("ieeese") 416 ("acmcs") ("acta") ("cacm") ("ibmjrd") ("ibmsj") ("ieeese")
368 ("ieeetc") ("ieeetcad") ("ipl") ("jacm") ("jcss") ("scp") 417 ("ieeetc") ("ieeetcad") ("ipl") ("jacm") ("jcss") ("scp")
369 ("sicomp") ("tcs") ("tocs") ("tods") ("tog") ("toms") ("toois") 418 ("sicomp") ("tcs") ("tocs") ("tods") ("tog") ("toms") ("toois")
370 ("toplas") 419 ("toplas")
371 )) 420 ))
372 "Alist of string definitions. 421 "Alist of string definitions.
373 Should contain the strings defined in the BibTeX style files. Each 422 Should contain the strings defined in the BibTeX style files. Each
374 element is a list with just one element: the string.") 423 element is a list with just one element: the string."
375 424 :group 'bibtex
376 (defvar bibtex-string-files nil 425 :type '(repeat
426 (list string)))
427
428 (defcustom bibtex-string-files nil
377 "*List of BibTeX files containing string definitions. 429 "*List of BibTeX files containing string definitions.
378 Those files must be specified using pathnames relative to the 430 Those files must be specified using pathnames relative to the
379 directories specified in bibtex-string-file-path. This variable is only 431 directories specified in bibtex-string-file-path. This variable is only
380 evaluated when bibtex-mode is entered (i. e. when loading the BibTeX 432 evaluated when bibtex-mode is entered (i. e. when loading the BibTeX
381 file).") 433 file)."
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."
388 442 :group 'bibtex
389 (defvar bibtex-autokey-prefix-string "" 443 :type 'boolean)
444
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.
391 See the documentation of function bibtex-generate-autokey for further detail.") 447 See the documentation of function bibtex-generate-autokey for further detail."
392 448 :group 'bibtex-autokey
393 (defvar bibtex-autokey-names 1 449 :type 'string)
450
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.
395 If this is set to anything but a number, all names are used. 453 If this is set to anything but a number, all names are used.
396 Possibly more names are used according to bibtex-autokey-names-stretch. 454 Possibly more names are used according to bibtex-autokey-names-stretch.
397 See the documentation of function bibtex-generate-autokey for further detail.") 455 See the documentation of function bibtex-generate-autokey for further detail."
398 456 :group 'bibtex-autokey
399 (defvar bibtex-autokey-names-stretch 0 457 :type 'integer)
458
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.
401 These names are used only, if all names are used then. 461 These names are used only, if all names are used then.
402 See the documentation of function bibtex-generate-autokey for details.") 462 See the documentation of function bibtex-generate-autokey for details."
403 463 :group 'bibtex-autokey
404 (defvar bibtex-autokey-additional-names "" 464 :type 'integer)
465
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.
406 See the documentation of function bibtex-generate-autokey for details.") 468 See 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 '(
410 ;; language specific characters 474 ;; language specific characters
411 ("\\\\aa" "a") 475 ("\\\\aa" "a")
429 Used by the default values of bibtex-autokey-name-change-strings and 493 Used by the default values of bibtex-autokey-name-change-strings and
430 bibtex-autokey-titleword-change-strings. Defaults to translating some 494 bibtex-autokey-titleword-change-strings. Defaults to translating some
431 language specific characters to their ascii transcriptions and 495 language specific characters to their ascii transcriptions and
432 removing any character accents.") 496 removing 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.
437 Any part of name matching a old-regexp is replaced by new-string. 501 Any part of name matching a old-regexp is replaced by new-string.
438 Case of the old-regexp is significant. All regexps are tried in the 502 Case of the old-regexp is significant. All regexps are tried in the
439 order in which they appear in the list, so be sure to avoid inifinite 503 order in which they appear in the list, so be sure to avoid inifinite
440 loops here. 504 loops here.
441 See the documentation of function bibtex-generate-autokey for details.") 505 See the documentation of function bibtex-generate-autokey for details."
442 506 :group 'bibtex-autokey
443 (defvar bibtex-autokey-name-length 'infty 507 :type '(repeat
508 (list (regexp :tag "Old")
509 (string :tag "New"))))
510
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.
445 If this is set to anything but a number, all characters are used. 513 If this is set to anything but a number, all characters are used.
446 See the documentation of function bibtex-generate-autokey for details.") 514 See the documentation of function bibtex-generate-autokey for details."
447 515 :group 'bibtex-autokey
448 (defvar bibtex-autokey-name-separator "" 516 :type '(choice (const :tag "All" infty)
517 integer))
518
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.
450 See the documentation of function bibtex-generate-autokey for details.") 521 See the documentation of function bibtex-generate-autokey for details."
451 522 :group 'bibtex-autokey
452 (defvar bibtex-autokey-year-length 2 523 :type 'string)
524
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.
454 See the documentation of function bibtex-generate-autokey for details.") 527 See the documentation of function bibtex-generate-autokey for details."
455 528 :group 'bibtex-autokey
456 (defvar bibtex-autokey-year-use-crossref-entry t 529 :type 'integer)
530
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.
458 If this variable is non-nil and the current entry has no year, but a 533 If this variable is non-nil and the current entry has no year, but a
459 valid crossref entry, the year field from the crossreferenced entry is 534 valid crossref entry, the year field from the crossreferenced entry is
460 used. 535 used.
461 See the documentation of function bibtex-generate-autokey for details.") 536 See the documentation of function bibtex-generate-autokey for details."
462 537 :group 'bibtex-autokey
463 (defvar bibtex-autokey-titlewords 5 538 :type 'boolean)
539
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.
465 If this is set to anything but a number, all title words are used. 542 If this is set to anything but a number, all title words are used.
466 Possibly more words from the title are used according to 543 Possibly more words from the title are used according to
467 bibtex-autokey-titlewords-stretch. 544 bibtex-autokey-titlewords-stretch.
468 See the documentation of function bibtex-generate-autokey for details.") 545 See the documentation of function bibtex-generate-autokey for details."
469 546 :group 'bibtex-autokey
470 (defvar bibtex-autokey-title-terminators 547 :type '(choice (const :tag "All" infty)
548 integer))
549
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.
473 Case of the regexps is ignored. 553 Case of the regexps is ignored.
474 See the documentation of function bibtex-generate-autokey for details.") 554 See the documentation of function bibtex-generate-autokey for details."
475 555 :group 'bibtex-autokey
476 (defvar bibtex-autokey-titlewords-stretch 2 556 :type '(repeat regexp))
557
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.
478 These words are used only, if a sentence from the title can be ended then. 560 These words are used only, if a sentence from the title can be ended then.
479 See the documentation of function bibtex-generate-autokey for details.") 561 See the documentation of function bibtex-generate-autokey for details."
480 562 :group 'bibtex-autokey
481 (defvar bibtex-autokey-titleword-first-ignore 563 :type 'integer)
564
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.
484 Each item of the list is a regexp. If the first word of the title matchs a 568 Each item of the list is a regexp. If the first word of the title matchs a
485 regexp from that list, it is not included in the title, even if it is 569 regexp from that list, it is not included in the title, even if it is
486 capitalized. Case of regexps in this list doesn't matter. 570 capitalized. Case of regexps in this list doesn't matter.
487 See the documentation of function bibtex-generate-autokey for details.") 571 See the documentation of function bibtex-generate-autokey for details."
488 572 :group 'bibtex-autokey
489 (defvar bibtex-autokey-titleword-abbrevs nil 573 :type '(repeat regexp))
574
575 (defcustom bibtex-autokey-titleword-abbrevs nil
490 "*Determines exceptions to the usual abbreviation mechanism. 576 "*Determines exceptions to the usual abbreviation mechanism.
491 An alist of (old-regexp new-string) pairs. Case of old-regexp ignored. 577 An alist of (old-regexp new-string) pairs. Case of old-regexp ignored.
492 The first matching pair is used. 578 The first matching pair is used.
493 See the documentation of function bibtex-generate-autokey for details.") 579 See 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.
498 Any part of title word matching a old-regexp is replaced by new-string. 584 Any part of title word matching a old-regexp is replaced by new-string.
499 Case of the old-regexp is significant. All regexps are tried in the 585 Case of the old-regexp is significant. All regexps are tried in the
500 order in which they appear in the list, so be sure to avoid inifinite 586 order in which they appear in the list, so be sure to avoid inifinite
501 loops here. 587 loops here.
502 See the documentation of function bibtex-generate-autokey for details.") 588 See the documentation of function bibtex-generate-autokey for details."
503 589 :group 'bibtex-autokey
504 (defvar bibtex-autokey-titleword-length 5 590 :type '(repeat
591 (list (regexp :tag "Old")
592 (string :tag "New"))))
593
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.
506 If this is set to anything but a number, all characters are used. 596 If this is set to anything but a number, all characters are used.
507 See the documentation of function bibtex-generate-autokey for details.") 597 See the documentation of function bibtex-generate-autokey for details."
508 598 :group 'bibtex-autokey
509 (defvar bibtex-autokey-titleword-separator "_" 599 :type '(choice (const :tag "All" infty)
600 integer))
601
602 (defcustom bibtex-autokey-titleword-separator "_"
510 "*String to be put between the title words. 603 "*String to be put between the title words.
511 See the documentation of function bibtex-generate-autokey for details.") 604 See the documentation of function bibtex-generate-autokey for details."
512 605 :group 'bibtex-autokey
513 (defvar bibtex-autokey-name-year-separator "" 606 :type 'string)
607
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.
515 See the documentation of function bibtex-generate-autokey for details.") 610 See the documentation of function bibtex-generate-autokey for details."
516 611 :group 'bibtex-autokey
517 (defvar bibtex-autokey-year-title-separator ":_" 612 :type 'string)
613
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.
519 See the documentation of function bibtex-generate-autokey for details.") 616 See the documentation of function bibtex-generate-autokey for details."
520 617 :group 'bibtex-autokey
521 (defvar bibtex-autokey-preserve-case nil 618 :type 'string)
619
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.
523 See the documentation of function bibtex-generate-autokey for details.") 622 See the documentation of function bibtex-generate-autokey for details."
524 623 :group 'bibtex-autokey
525 (defvar bibtex-autokey-edit-before-use t 624 :type 'boolean)
526 "*If non-nil, user is allowed to edit the generated key before it is used.") 625
527 626 (defcustom bibtex-autokey-edit-before-use t
528 (defvar bibtex-autokey-before-presentation-hook nil 627 "*If non-nil, user is allowed to edit the generated key before it is used."
628 :group 'bibtex-autokey
629 :type 'boolean)
630
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.
530 If non-nil this should be a single function, which is called before 633 If non-nil this should be a single function, which is called before
531 the generated key is presented (in entry or, if 634 the 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
533 must take one argument (the automatically generated key), and must 636 must take one argument (the automatically generated key), and must
534 return with a string (the key to use).") 637 return with a string (the key to use)."
535 638 :group 'bibtex-autokey
536 (defvar bibtex-entry-offset 0 639 :type 'function)
640
641 (defcustom bibtex-entry-offset 0
537 "*Offset for BibTeX entries. 642 "*Offset for BibTeX entries.
538 Added to the value of all other variables which determine colums.") 643 Added to the value of all other variables which determine colums."
539 644 :group 'bibtex
540 (defvar bibtex-field-indentation 2 645 :type 'integer)
541 "*Starting column for the name part in BibTeX fields.") 646
542 647 (defcustom bibtex-field-indentation 2
543 (defvar bibtex-text-indentation 648 "*Starting column for the name part in BibTeX fields."
649 :group 'bibtex
650 :type 'integer)
651
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.
548 Should be equal to the space needed for the longest name part.") 657 Should be equal to the space needed for the longest name part."
549 658 :group 'bibtex
550 (defvar bibtex-contline-indentation 659 :type 'integer)
660
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."
553 664 :group 'bibtex
554 (defvar bibtex-align-at-equal-sign nil 665 :type 'integer)
666
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.
556 If non nil, column of equal sign is bibtex-text-indentation - 2.") 669 If 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
563 ;; section of this file, it is defined later. 680 ;; section of this file, it is defined later.
564 681