diff options
| author | Richard M. Stallman | 1997-08-22 02:05:30 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-22 02:05:30 +0000 |
| commit | f754fb7b941c6f3228be5e43e458ac862f699387 (patch) | |
| tree | c1d583187887fff2dfb8428453f7cae0bfefece2 | |
| parent | e821c4f928d2addb05de491798758011bf99b4d5 (diff) | |
| download | emacs-f754fb7b941c6f3228be5e43e458ac862f699387.tar.gz emacs-f754fb7b941c6f3228be5e43e458ac862f699387.zip | |
Customized.
| -rw-r--r-- | lisp/textmodes/bibtex.el | 305 |
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. |
| 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." |
| 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. |
| 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)." |
| 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. |
| 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 |
| @@ -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) |
| 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." |
| 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. |
| 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." |
| 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. |
| 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." |
| 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. |
| 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 | '( |
| @@ -348,19 +392,24 @@ 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." |
| 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. |
| 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." |
| 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. |
| 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." |
| 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. |
| 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." |
| 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. |
| 391 | See the documentation of function bibtex-generate-autokey for further detail.") | 447 | See 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. |
| 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." |
| 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. |
| 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." |
| 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. |
| 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 | '( |
| @@ -431,132 +495,185 @@ 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." |
| 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. |
| 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." |
| 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. |
| 450 | See the documentation of function bibtex-generate-autokey for details.") | 521 | See 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. |
| 454 | See the documentation of function bibtex-generate-autokey for details.") | 527 | See 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. |
| 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." |
| 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. |
| 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." |
| 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. |
| 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." |
| 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. |
| 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." |
| 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. |
| 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." |
| 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. |
| 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." |
| 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. |
| 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." |
| 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. |
| 511 | See the documentation of function bibtex-generate-autokey for details.") | 604 | See 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. |
| 515 | See the documentation of function bibtex-generate-autokey for details.") | 610 | See 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. |
| 519 | See the documentation of function bibtex-generate-autokey for details.") | 616 | See 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. |
| 523 | See the documentation of function bibtex-generate-autokey for details.") | 622 | See 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. |
| 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)." |
| 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. |
| 538 | Added to the value of all other variables which determine colums.") | 643 | Added 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. |
| 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." |
| 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. |
| 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 |