emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/textmodes/reftex-cite.el


From: Carsten Dominik
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/reftex-cite.el
Date: Mon, 14 Feb 2005 07:12:05 -0500

Index: emacs/lisp/textmodes/reftex-cite.el
diff -c emacs/lisp/textmodes/reftex-cite.el:1.24 
emacs/lisp/textmodes/reftex-cite.el:1.25
*** emacs/lisp/textmodes/reftex-cite.el:1.24    Sun Jan 16 02:37:50 2005
--- emacs/lisp/textmodes/reftex-cite.el Mon Feb 14 12:12:04 2005
***************
*** 679,687 ****
                (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.
          (when reftex-cite-cleanup-optional-args
            (cond 
             ((string-match "\\[\\]\\(\\[[a-zA-Z0-9., ]+\\]\\)" string)
              (setq string (replace-match "\\1" nil nil string)))
             ((string-match "\\[\\]\\[\\]" string)
--- 679,690 ----
                (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.  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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]