1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Fix regex used for searching citation keys.

* 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.
This commit is contained in:
Tassilo Horn 2014-01-21 09:18:30 +01:00
parent 5004c3bfbb
commit e7d807cae8
2 changed files with 7 additions and 1 deletions

View 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.

View 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)))