auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. c2


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, lexical-binding-attempt-1, updated. c2f046235a8a40c686e1196b6845a43c451f2809
Date: Fri, 16 Oct 2020 08:58:40 -0400 (EDT)

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, lexical-binding-attempt-1 has been updated
       via  c2f046235a8a40c686e1196b6845a43c451f2809 (commit)
      from  1ed87f833b1abffa79bd6dda0e9aa0b2c29cbae2 (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 c2f046235a8a40c686e1196b6845a43c451f2809
Author: Arash Esbati <arash@gnu.org>
Date:   Fri Oct 16 14:56:58 2020 +0200

    Fix insertion of unnecessary backslash
    
    * style/amsthm.el (LaTeX-arg-amsthm-fontdecl):
    * style/ntheorem.el (LaTeX-arg-ntheorem-fontdecl): Don't insert a
    backslash if the query for font declaration is left empty.

diff --git a/style/amsthm.el b/style/amsthm.el
index 569cef9..f7cc6bb 100644
--- a/style/amsthm.el
+++ b/style/amsthm.el
@@ -58,15 +58,16 @@
   "Prompt for font declaration commands in \"\\newtheoremstyle\".
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument.  Use PROMPT as the prompt string."
-  ;; `INITIAL-INPUT' (5th argument to `TeX-completing-read-multiple')
-  ;; is hard-coded to `TeX-esc'.
   (let* ((crm-separator (regexp-quote TeX-esc))
         (fontdecl (mapconcat #'identity
                              (TeX-completing-read-multiple
                               (TeX-argument-prompt optional prompt "Font: \\" 
t)
                               LaTeX-amsthm-fontdecl)
                              TeX-esc)))
-    (TeX-argument-insert fontdecl optional)))
+    (TeX-argument-insert fontdecl
+                        optional
+                        (when (and fontdecl (not (string= fontdecl "")))
+                          TeX-esc))))
 
 (defun LaTeX-amsthm-env-label (environment)
   "Insert ENVIRONMENT, query for an optional argument and prompt
@@ -161,7 +162,6 @@ make them available as new environments."
     '("theoremstyle"
       (TeX-arg-eval completing-read
                    (TeX-argument-prompt nil nil "Style")
-                   ;; LaTeX-amsthm-theoremstyle-list
                    (LaTeX-amsthm-newtheoremstyle-list)))
     "qedhere"
     "swapnumbers"
diff --git a/style/ntheorem.el b/style/ntheorem.el
index 03bdf4f..4886442 100644
--- a/style/ntheorem.el
+++ b/style/ntheorem.el
@@ -77,18 +77,19 @@ defined with \"\\newtheoremlisttype\".")
   "List of font declaration commands for \"\\newtheoremstyle\".")
 
 (defun LaTeX-arg-ntheorem-fontdecl (optional &optional prompt)
-  "Prompt for font declaration commands in \"\\theorem(body\|header)font\".
+  "Prompt for font declaration commands in \"\\theorem(body|header)font\".
 If OPTIONAL is non-nil, insert the resulting value as an optional
 argument.  Use PROMPT as the prompt string."
-  ;; `INITIAL-INPUT' (5th argument to `TeX-completing-read-multiple')
-  ;; is hard-coded to `TeX-esc'.
   (let* ((crm-separator (regexp-quote TeX-esc))
-        (fontdecl (mapconcat 'identity
+        (fontdecl (mapconcat #'identity
                              (TeX-completing-read-multiple
-                              (TeX-argument-prompt optional prompt "Font 
declaration")
-                              LaTeX-ntheorem-fontdecl nil nil TeX-esc)
+                              (TeX-argument-prompt optional prompt "Font 
declaration: \\" t)
+                              LaTeX-ntheorem-fontdecl)
                              TeX-esc)))
-    (TeX-argument-insert fontdecl optional)))
+    (TeX-argument-insert fontdecl
+                        optional
+                        (when (and fontdecl (not (string= fontdecl "")))
+                          TeX-esc))))
 
 (defun LaTeX-ntheorem-env-label (environment)
   "Insert ENVIRONMENT, query for an optional argument and prompt

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

Summary of changes:
 style/amsthm.el   |  8 ++++----
 style/ntheorem.el | 15 ++++++++-------
 2 files changed, 12 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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