aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Dominik2005-02-14 12:12:04 +0000
committerCarsten Dominik2005-02-14 12:12:04 +0000
commit3ee26b0c2088615cae3ead63b22714d54ffee2ae (patch)
tree15ae4a8a32bd551794d2923e69c3e94ab2543a24
parenta4869139832f3cc3f54cc1aa1c5b45a0e26e9655 (diff)
downloademacs-3ee26b0c2088615cae3ead63b22714d54ffee2ae.tar.gz
emacs-3ee26b0c2088615cae3ead63b22714d54ffee2ae.zip
(reftex-do-citation): Cleanup single
optional argument to \cite.
-rw-r--r--lisp/textmodes/reftex-cite.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el
index 6369f9637db..bfe2cd8282b 100644
--- a/lisp/textmodes/reftex-cite.el
+++ b/lisp/textmodes/reftex-cite.el
@@ -679,9 +679,12 @@ While entering the regexp, completion on knows citation keys is possible.
679 (setq start (1+ start))))) 679 (setq start (1+ start)))))
680 ;; Should we cleanup empty optional arguments? 680 ;; Should we cleanup empty optional arguments?
681 ;; if the first is empty, it can be removed. If the second is empty, 681 ;; if the first is empty, it can be removed. If the second is empty,
682 ;; it has to go. 682 ;; it has to go. If there is only a single arg and empty, it can go
683 ;; as well.
683 (when reftex-cite-cleanup-optional-args 684 (when reftex-cite-cleanup-optional-args
684 (cond 685 (cond
686 ((string-match "\\([a-zA-Z0-9]\\)\\[\\]{" string)
687 (setq string (replace-match "\\1{" nil nil string)))
685 ((string-match "\\[\\]\\(\\[[a-zA-Z0-9., ]+\\]\\)" string) 688 ((string-match "\\[\\]\\(\\[[a-zA-Z0-9., ]+\\]\\)" string)
686 (setq string (replace-match "\\1" nil nil string))) 689 (setq string (replace-match "\\1" nil nil string)))
687 ((string-match "\\[\\]\\[\\]" string) 690 ((string-match "\\[\\]\\[\\]" string)