]> code.delx.au - gnu-emacs/commitdiff
(bibtex-format-entry, bibtex-search-crossref): Allow OPT prefix for
authorRoland Winkler <Roland.Winkler@physik.uni-erlangen.de>
Mon, 6 Apr 2009 20:44:15 +0000 (20:44 +0000)
committerRoland Winkler <Roland.Winkler@physik.uni-erlangen.de>
Mon, 6 Apr 2009 20:44:15 +0000 (20:44 +0000)
name of crossref field.

lisp/ChangeLog
lisp/textmodes/bibtex.el

index 4b6d1517d6f3e436c4ff9e55d0228dc11cae2341..7639ed724bde2749dcc719af4cae22f48716f65a 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-06  Roland Winkler  <Roland.Winkler@physik.uni-erlangen.de>
+
+       * textmodes/bibtex.el (bibtex-format-entry)
+       (bibtex-search-crossref): Allow OPT prefix for name of crossref
+       field.
+
 2009-04-06  Sam Steingold  <sds@gnu.org>
 
        * simple.el (completion-list-mode-map): Bind "q" to quit-window,
index edc4b6562b48c39d69e47e23a62c32795000a8a3..a45a187354e0ac55b7c4c432a5200d5ae8adb3f5 100644 (file)
@@ -1932,7 +1932,8 @@ Formats current entry according to variable `bibtex-entry-format'."
 
                 ;; 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 @@ for a crossref key, t otherwise."
             (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)