]> git.eshelyaron.com Git - emacs.git/commitdiff
RefTeX: Improve matching of bib entries.
authorRalf Angeli <angeli@caeruleus.net>
Sat, 6 Nov 2010 15:56:29 +0000 (16:56 +0100)
committerRalf Angeli <angeli@caeruleus.net>
Sat, 6 Nov 2010 15:56:29 +0000 (16:56 +0100)
lisp/ChangeLog
lisp/textmodes/reftex-cite.el

index f9280d5f0c6f048b3d488c043ec047c7a77dd7b0..9407c62075f84a518e480b82c1b16a683cf2d80f 100644 (file)
@@ -1,3 +1,12 @@
+2010-11-06  Ralf Angeli  <angeli@caeruleus.net>
+
+       * 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  <cm@abtela.com>  (tiny change)
 
        * shell.el (shell-process-popd): Made aware of comint-file-name-prefix.
index 5edd9f24122b19f6a0bea1a2c568f650a7748840..2c8a14a3808b77d78d9b1212c35110ba8473f88c 100644 (file)
                                              (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