]> code.delx.au - gnu-emacs/commitdiff
Fix regex used for searching citation keys.
authorTassilo Horn <tsdh@gnu.org>
Tue, 21 Jan 2014 08:18:30 +0000 (09:18 +0100)
committerTassilo Horn <tsdh@gnu.org>
Tue, 21 Jan 2014 08:18:30 +0000 (09:18 +0100)
* lisp/textmodes/reftex-cite.el (reftex-all-used-citation-keys): Fix
regex used for scanning for citation keys which failed for
citations with optional arguments.

lisp/ChangeLog
lisp/textmodes/reftex-cite.el

index 1f899700d468ac581104b778d0fe601aa5b19041..8f5ae243eebf72d63e32012b0e0e13f964d650f6 100644 (file)
@@ -1,3 +1,9 @@
+2014-01-21  Tassilo Horn  <tsdh@gnu.org>
+
+       * textmodes/reftex-cite.el (reftex-all-used-citation-keys): Fix
+       regex used for scanning for citation keys which failed for
+       citations with optional arguments.
+
 2014-01-21  Leo Liu  <sdl.web@gmail.com>
 
        * simple.el (read--expression): Don't enable eldoc-mode.
index 1654397dc67244ef49148cc56fce675302706e7f..a36fa17fca5ae3407b198c57022338ea02335b73 100644 (file)
@@ -1130,7 +1130,7 @@ recommended for follow mode.  It works OK for individual lookups."
           (save-restriction
             (widen)
             (goto-char (point-min))
-            (while (re-search-forward "\\(?:^\\|\\=\\)[^%\n\r]*?\\\\\\(bibentry\\|[a-zA-Z]*cite[a-zA-Z]*\\)\\(\\[[^\\]]*\\]\\)?{\\([^}]+\\)}" nil t)
+            (while (re-search-forward "\\(?:^\\|\\=\\)[^%\n\r]*?\\\\\\(bibentry\\|[a-zA-Z]*cite[a-zA-Z]*\\)\\(\\[[^]]*\\]\\)?{\\([^}]+\\)}" nil t)
               (setq kk (match-string-no-properties 3))
               (while (string-match "%.*\n?" kk)
                 (setq kk (replace-match "" t t kk)))