auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] [elpa] externals/auctex d5e8b7d 2/6: Use `TeX-argument-in


From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex d5e8b7d 2/6: Use `TeX-argument-insert' instead of conditional `insert'
Date: Mon, 17 Oct 2016 16:25:43 +0000 (UTC)

branch: externals/auctex
commit d5e8b7d38e5683161e542bb5b62a75df05b6e7a6
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>

    Use `TeX-argument-insert' instead of conditional `insert'
    
    * style/biblatex.el (LaTeX-arg-biblatex-natbib-notes): Use
    `TeX-argument-insert' instead of `insert' for arguments
    insertion.
---
 style/biblatex.el |   25 +++++++------------------
 1 file changed, 7 insertions(+), 18 deletions(-)

diff --git a/style/biblatex.el b/style/biblatex.el
index 5a9d373..2b8ba85 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -223,24 +223,13 @@ for citation keys."
                  (TeX-argument-prompt optional nil "Prenote")))
            (post (TeX-read-string
                   (TeX-argument-prompt optional nil "Postnote"))))
-       (cond
-        (;; Both optional args are given
-         (and pre (not (string= pre ""))
-              post (not (string= post "")))
-         (insert LaTeX-optop pre LaTeX-optcl
-                 LaTeX-optop post LaTeX-optcl))
-        (;; pre is given, post is empty: Make sure that we insert an
-         ;; extra pair of `[]', otherwise pre becomes post
-         (and pre (not (string= pre ""))
-              (string= post ""))
-         (insert LaTeX-optop pre LaTeX-optcl
-                 LaTeX-optop LaTeX-optcl))
-        (;; pre is empty, post is given
-         (and (string= pre "")
-              post (not (string= post "")))
-         (insert LaTeX-optop post LaTeX-optcl))
-        (;; both empty
-         t (ignore))))))
+       (TeX-argument-insert pre optional)
+       (TeX-argument-insert post optional)
+       ;; pre is given, post is empty: Make sure that we insert an
+       ;; extra pair of `[]', otherwise pre becomes post
+       (when (and pre (not (string= pre ""))
+                  (string= post ""))
+         (insert LaTeX-optop LaTeX-optcl)))))
 
 (TeX-add-style-hook
  "biblatex"



reply via email to

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