summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Winkler <Roland.Winkler@physik.uni-erlangen.de>2008-08-18 00:39:22 +0000
committerRoland Winkler <Roland.Winkler@physik.uni-erlangen.de>2008-08-18 00:39:22 +0000
commite56d3af5f0f28aea89004fcce2c140c8a4d5b468 (patch)
tree156717526ad892219eb0c04d6748c99eba04d8f1
parent85fd2f9da068c05e6dd6f4eb82d3898ab860d2bc (diff)
downloademacs-e56d3af5f0f28aea89004fcce2c140c8a4d5b468.tar.gz
(bibtex-entry-format): Mark as safe.
(bibtex-autokey-year-title-separator): Fix doscstring.
-rw-r--r--lisp/textmodes/bibtex.el16
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."
(const unify-case)
(const braces)
(const strings))))
+(put 'bibtex-entry-format 'safe-local-variable
+ (lambda (x)
+ (or (eq x t)
+ (let ((OK t))
+ (while (consp x)
+ (unless (memq (pop x)
+ '(opts-or-alts required-fields numerical-fields
+ page-dashes whitespace inherit-booktitle realign
+ last-comma delimiters unify-case braces strings))
+ (setq OK nil)))
+ (unless (null x) (setq OK nil))
+ OK))))
(defcustom bibtex-field-braces-alist nil
"Alist of field regexps that \\[bibtex-clean-entry] encloses by braces.
@@ -795,7 +807,7 @@ See `bibtex-generate-autokey' for details."
:type 'string)
(defcustom bibtex-autokey-year-title-separator ":_"
- "String to be put between name part and year part of key.
+ "String to be put between year part and title part of key.
See `bibtex-generate-autokey' for details."
:group 'bibtex-autokey
:type 'string)
@@ -4150,7 +4162,7 @@ intermixed with \\[bibtex-pop-previous] (bibtex-pop-previous)."
(defun bibtex-clean-entry (&optional new-key called-by-reformat)
"Finish editing the current BibTeX entry and clean it up.
-Check that no required fields are empty and formats entry dependent
+Check that no required fields are empty and format entry dependent
on the value of `bibtex-entry-format'.
If the reference key of the entry is empty or a prefix argument is given,
calculate a new reference key. (Note: this works only if fields in entry