diff lisp/textmodes/reftex-cite.el @ 111419:898b96cf89b3

RefTeX: Improve matching of bib entries.
author Ralf Angeli <angeli@caeruleus.net>
date Sat, 06 Nov 2010 16:56:29 +0100
parents 2ab042032557
children 417b1e4d63cd
line wrap: on
line diff
--- a/lisp/textmodes/reftex-cite.el	Sat Nov 06 15:49:29 2010 +0200
+++ b/lisp/textmodes/reftex-cite.el	Sat Nov 06 16:56:29 2010 +0100
@@ -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 @@
            (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