Mercurial > emacs
changeset 60056:978d83f0a49f
(reftex-do-citation): Cleanup single
optional argument to \cite.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Mon, 14 Feb 2005 12:12:04 +0000 |
parents | f704b30efbdf |
children | c81f31db6e84 |
files | lisp/textmodes/reftex-cite.el |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/reftex-cite.el Mon Feb 14 12:11:02 2005 +0000 +++ b/lisp/textmodes/reftex-cite.el Mon Feb 14 12:12:04 2005 +0000 @@ -679,9 +679,12 @@ (setq start (1+ start))))) ;; Should we cleanup empty optional arguments? ;; if the first is empty, it can be removed. If the second is empty, - ;; it has to go. + ;; it has to go. If there is only a single arg and empty, it can go + ;; as well. (when reftex-cite-cleanup-optional-args (cond + ((string-match "\\([a-zA-Z0-9]\\)\\[\\]{" string) + (setq string (replace-match "\\1{" nil nil string))) ((string-match "\\[\\]\\(\\[[a-zA-Z0-9., ]+\\]\\)" string) (setq string (replace-match "\\1" nil nil string))) ((string-match "\\[\\]\\[\\]" string)