From: Ralf Angeli Date: Sat, 6 Nov 2010 15:56:29 +0000 (+0100) Subject: RefTeX: Improve matching of bib entries. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~364 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5d8f9169b67b2a880d8cf2cb7daa5eeeea5e60ec;p=emacs.git RefTeX: Improve matching of bib entries. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f9280d5f0c6..9407c62075f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2010-11-06 Ralf Angeli + + * textmodes/reftex-cite.el + (reftex-extract-bib-entries-from-thebibliography): Match bibitem + entries with whitespace after \bibitem. + (reftex-create-bibtex-file): Match entries containing numbers and + symbol constituents. Make sure that entries with whitespace at + various places are found. + 2010-11-05 Christian Millour (tiny change) * shell.el (shell-process-popd): Made aware of comint-file-name-prefix. diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index 5edd9f24122..2c8a14a3808 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el @@ -379,7 +379,7 @@ (split-string (buffer-substring-no-properties start end) - "[ \t\n\r]*\\\\bibitem\ + "[ \t\n\r]*\\\\bibitem[ \t]*\ \\(\\[[^]]*]\\)*\[ \t]*")))))) (goto-char end)))))) (unless entries @@ -1147,9 +1147,8 @@ The sequence in the new file is the same as it was in the old database." (save-restriction (widen) (goto-char (point-min)) - (while (re-search-forward - "^[ \t]*@[a-zA-Z]+[ \t]*{\\([^ \t\r\n]+\\)," - nil t) + (while (re-search-forward "^[ \t]*@\\(?:\\w\\|\\s_\\)+[ \t\n\r]*\ +\[{(][ \t\n\r]*\\([^ \t\n\r,]+\\)" nil t) (setq key (match-string 1) beg (match-beginning 0) end (progn