aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)