auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 1aa46c3e193ac4c9d2358


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 1aa46c3e193ac4c9d23586b59e2256841d02c413
Date: Tue, 13 Dec 2016 14:29:07 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  1aa46c3e193ac4c9d23586b59e2256841d02c413 (commit)
      from  42dd1f1bbd55361be0494e2f8456c2535aecb855 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1aa46c3e193ac4c9d23586b59e2256841d02c413
Author: Arash Esbati <address@hidden>
Date:   Tue Dec 13 15:27:28 2016 +0100

    ; Use third argument of `TeX-argument-insert'
    
    * style/mathtools.el (LaTeX-mathtools-arg-mathstyle-completion)
    (LaTeX-mathtools-arg-mathsize-completion):
    (LaTeX-mathtools-arg-declarepaireddelimiter): Use third argument
    of `TeX-argument-insert' to prepend user input with `TeX-esc'.

diff --git a/style/mathtools.el b/style/mathtools.el
index a55201d..025feca 100644
--- a/style/mathtools.el
+++ b/style/mathtools.el
@@ -144,28 +144,22 @@
   "Query and insert mathstyle argument to various commands.
 If OPTIONAL, insert it as optional argument in brackets."
   (TeX-argument-insert
-   (let ((style (completing-read
-                (TeX-argument-prompt optional nil
-                                     (concat "Math style: " TeX-esc) t)
-                '("displaystyle" "textstyle"
-                  "scriptstyle"  "scriptscriptstyle"))))
-     (if (string= style "")
-        style
-       (concat TeX-esc style)))
-   optional))
+   (completing-read
+    (TeX-argument-prompt optional nil
+                        (concat "Math style: " TeX-esc) t)
+    '("displaystyle" "textstyle"
+      "scriptstyle"  "scriptscriptstyle"))
+   optional TeX-esc))
 
 (defun LaTeX-mathtools-arg-mathsize-completion (optional)
   "Query and insert math size argument to various commands.
 If OPTIONAL, insert it as optional argument in brackets."
   (TeX-argument-insert
-   (let ((size (completing-read
-               (TeX-argument-prompt optional nil
-                                    (concat "Size command: " TeX-esc) t)
-               '("big" "Big" "bigg" "Bigg"))))
-     (if (string= size "")
-        size
-       (concat TeX-esc size)))
-   optional))
+   (completing-read
+    (TeX-argument-prompt optional nil
+                        (concat "Size command: " TeX-esc) t)
+    '("big" "Big" "bigg" "Bigg"))
+   optional TeX-esc))
 
 (defun LaTeX-mathtools-arg-declarepaireddelimiter (optional &optional X)
   "Query and insert various \\DeclarePairedDelimiter macros from mathtools 
package."
@@ -183,7 +177,7 @@ If OPTIONAL, insert it as optional argument in brackets."
                          1)))
     (LaTeX-add-mathtools-DeclarePairedDelimiters
      `(,cmd ,(if X arg "")))
-    (TeX-argument-insert (concat TeX-esc cmd) optional)
+    (TeX-argument-insert cmd optional TeX-esc)
     (when arg
       (insert (concat LaTeX-optop arg LaTeX-optcl)))))
 

-----------------------------------------------------------------------

Summary of changes:
 style/mathtools.el |   30 ++++++++++++------------------
 1 file changed, 12 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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