]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/reftex-cite.el
Merge from emacs-23
[gnu-emacs] / lisp / textmodes / reftex-cite.el
index 5edd9f24122b19f6a0bea1a2c568f650a7748840..19663f81bd4a480bdb68d1510deac4ab83dce0d7 100644 (file)
@@ -1,7 +1,7 @@
 ;;; reftex-cite.el --- creating citations with RefTeX
 
 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;;   2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@science.uva.nl>
 ;; Maintainer: auctex-devel@gnu.org
                                              (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