From: Roland Winkler Date: Mon, 6 Apr 2009 20:44:15 +0000 (+0000) Subject: (bibtex-format-entry, bibtex-search-crossref): Allow OPT prefix for X-Git-Tag: emacs-pretest-23.0.93~212 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=45cb4eb44f456d628bc136c50aa777e9368244f9;p=emacs.git (bibtex-format-entry, bibtex-search-crossref): Allow OPT prefix for name of crossref field. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b6d1517d6f..7639ed724bd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-04-06 Roland Winkler + + * textmodes/bibtex.el (bibtex-format-entry) + (bibtex-search-crossref): Allow OPT prefix for name of crossref + field. + 2009-04-06 Sam Steingold * simple.el (completion-list-mode-map): Bind "q" to quit-window, diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index edc4b6562b4..a45a187354e 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -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)