aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Winkler2009-04-06 20:44:15 +0000
committerRoland Winkler2009-04-06 20:44:15 +0000
commit45cb4eb44f456d628bc136c50aa777e9368244f9 (patch)
tree9f35f79584de9e8e6d824a32d88be574ea42a6ab
parent45f8cb0c08905a0ed4024731d36639c625958f51 (diff)
downloademacs-45cb4eb44f456d628bc136c50aa777e9368244f9.tar.gz
emacs-45cb4eb44f456d628bc136c50aa777e9368244f9.zip
(bibtex-format-entry, bibtex-search-crossref): Allow OPT prefix for
name of crossref field.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/textmodes/bibtex.el5
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4b6d1517d6f..7639ed724bd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12009-04-06 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
2
3 * textmodes/bibtex.el (bibtex-format-entry)
4 (bibtex-search-crossref): Allow OPT prefix for name of crossref
5 field.
6
12009-04-06 Sam Steingold <sds@gnu.org> 72009-04-06 Sam Steingold <sds@gnu.org>
2 8
3 * simple.el (completion-list-mode-map): Bind "q" to quit-window, 9 * 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'."
1932 1932
1933 ;; Do we have a crossref key? 1933 ;; Do we have a crossref key?
1934 (goto-char (point-min)) 1934 (goto-char (point-min))
1935 (if (setq bounds (bibtex-search-forward-field "crossref")) 1935 (if (setq bounds (bibtex-search-forward-field
1936 "\\(OPT\\)?crossref"))
1936 (let ((text (bibtex-text-in-field-bounds bounds t))) 1937 (let ((text (bibtex-text-in-field-bounds bounds t)))
1937 (unless (equal "" text) 1938 (unless (equal "" text)
1938 (setq crossref-key text)))) 1939 (setq crossref-key text))))
@@ -3521,7 +3522,7 @@ for a crossref key, t otherwise."
3521 (end (cdr (bibtex-valid-entry t))) 3522 (end (cdr (bibtex-valid-entry t)))
3522 (_ (unless end (error "Not inside valid entry"))) 3523 (_ (unless end (error "Not inside valid entry")))
3523 (beg (match-end 0)) ; set by `bibtex-valid-entry' 3524 (beg (match-end 0)) ; set by `bibtex-valid-entry'
3524 (bounds (bibtex-search-forward-field "crossref" end)) 3525 (bounds (bibtex-search-forward-field "\\(OPT\\)?crossref" end))
3525 case-fold-search best temp crossref-key) 3526 case-fold-search best temp crossref-key)
3526 (if bounds 3527 (if bounds
3527 (setq crossref-key (bibtex-text-in-field-bounds bounds t) 3528 (setq crossref-key (bibtex-text-in-field-bounds bounds t)