diff options
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/bibtex.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 362aea1e4e4..e5e3f4d7693 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el | |||
| @@ -146,6 +146,18 @@ The value nil means do no formatting at all." | |||
| 146 | (const unify-case) | 146 | (const unify-case) |
| 147 | (const braces) | 147 | (const braces) |
| 148 | (const strings)))) | 148 | (const strings)))) |
| 149 | (put 'bibtex-entry-format 'safe-local-variable | ||
| 150 | (lambda (x) | ||
| 151 | (or (eq x t) | ||
| 152 | (let ((OK t)) | ||
| 153 | (while (consp x) | ||
| 154 | (unless (memq (pop x) | ||
| 155 | '(opts-or-alts required-fields numerical-fields | ||
| 156 | page-dashes whitespace inherit-booktitle realign | ||
| 157 | last-comma delimiters unify-case braces strings)) | ||
| 158 | (setq OK nil))) | ||
| 159 | (unless (null x) (setq OK nil)) | ||
| 160 | OK)))) | ||
| 149 | 161 | ||
| 150 | (defcustom bibtex-field-braces-alist nil | 162 | (defcustom bibtex-field-braces-alist nil |
| 151 | "Alist of field regexps that \\[bibtex-clean-entry] encloses by braces. | 163 | "Alist of field regexps that \\[bibtex-clean-entry] encloses by braces. |
| @@ -795,7 +807,7 @@ See `bibtex-generate-autokey' for details." | |||
| 795 | :type 'string) | 807 | :type 'string) |
| 796 | 808 | ||
| 797 | (defcustom bibtex-autokey-year-title-separator ":_" | 809 | (defcustom bibtex-autokey-year-title-separator ":_" |
| 798 | "String to be put between name part and year part of key. | 810 | "String to be put between year part and title part of key. |
| 799 | See `bibtex-generate-autokey' for details." | 811 | See `bibtex-generate-autokey' for details." |
| 800 | :group 'bibtex-autokey | 812 | :group 'bibtex-autokey |
| 801 | :type 'string) | 813 | :type 'string) |
| @@ -4150,7 +4162,7 @@ intermixed with \\[bibtex-pop-previous] (bibtex-pop-previous)." | |||
| 4150 | 4162 | ||
| 4151 | (defun bibtex-clean-entry (&optional new-key called-by-reformat) | 4163 | (defun bibtex-clean-entry (&optional new-key called-by-reformat) |
| 4152 | "Finish editing the current BibTeX entry and clean it up. | 4164 | "Finish editing the current BibTeX entry and clean it up. |
| 4153 | Check that no required fields are empty and formats entry dependent | 4165 | Check that no required fields are empty and format entry dependent |
| 4154 | on the value of `bibtex-entry-format'. | 4166 | on the value of `bibtex-entry-format'. |
| 4155 | If the reference key of the entry is empty or a prefix argument is given, | 4167 | If the reference key of the entry is empty or a prefix argument is given, |
| 4156 | calculate a new reference key. (Note: this works only if fields in entry | 4168 | calculate a new reference key. (Note: this works only if fields in entry |