changeset 102868:cf16d0f54438

(bibtex-format-entry, bibtex-search-crossref): Allow OPT prefix for name of crossref field.
author Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
date Mon, 06 Apr 2009 20:43:18 +0000
parents 8a809181875d
children 49cba8dff218
files lisp/textmodes/bibtex.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/bibtex.el	Mon Apr 06 15:45:00 2009 +0000
+++ b/lisp/textmodes/bibtex.el	Mon Apr 06 20:43:18 2009 +0000
@@ -1932,7 +1932,8 @@
 
                 ;; Do we have a crossref key?
                 (goto-char (point-min))
-                (if (setq bounds (bibtex-search-forward-field "crossref"))
+                (if (setq bounds (bibtex-search-forward-field
+                                  "\\(OPT\\)?crossref"))
                     (let ((text (bibtex-text-in-field-bounds bounds t)))
                       (unless (equal "" text)
                         (setq crossref-key text))))
@@ -3521,7 +3522,7 @@
             (end (cdr (bibtex-valid-entry t)))
             (_ (unless end (error "Not inside valid entry")))
             (beg (match-end 0)) ; set by `bibtex-valid-entry'
-            (bounds (bibtex-search-forward-field "crossref" end))
+            (bounds (bibtex-search-forward-field "\\(OPT\\)?crossref" end))
             case-fold-search best temp crossref-key)
        (if bounds
            (setq crossref-key (bibtex-text-in-field-bounds bounds t)