* Wolfgang Mayer (2009-02-25) writes:
> reftex-all-used-citation-keys extracts only the cite keys that appear
> in the last \cite{} command in a line, but skips other \cite{}'s on
> the same line.
>
> Enclosed are:
> * a test case to demonstrate the problem (.tex and .bib file) (tested
> using Emacs 22.3.1, today's CVS checkout, reftex-cite.el revision
> 1.52)
> * a patch to fix it.
Thanks! I've applied the patch.
> - (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)
Just as a random thought: Using \= here is a smart way to prevent the
regexp from matching in %-based comments. Should we ever want to use
RefTeX for modes with other comment starters, we might have to think
about doing things like this with `reftex-in-comment'.
--
Ralf
_______________________________________________
auctex-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex-devel