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. 0d790743293bf6f21fa2d


From: Arash Esbati
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 0d790743293bf6f21fa2dc9e09eff0729e59c8e0
Date: Sat, 25 Jan 2020 16:47:18 -0500 (EST)

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  0d790743293bf6f21fa2dc9e09eff0729e59c8e0 (commit)
      from  0bc0ff588cfdf369147596fe8a601bad3698a462 (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 0d790743293bf6f21fa2dc9e09eff0729e59c8e0
Author: Uwe Brauer <address@hidden>
Date:   Sat Jan 25 22:45:31 2020 +0100

    Add support for some missing environments
    
    * style/exam.el (LaTeX-exam-insert-item):
    ("exam"): Add support for various "choices" and "checkboxes"
    environments.
    
    ("exam"): Append the entries added to `LaTeX-item-list'.
    Enter a space in the buffer after the \choice macro.
    
    Signed-off-by: Arash Esbati <address@hidden>

diff --git a/style/exam.el b/style/exam.el
index be8126d..3ecc38d 100644
--- a/style/exam.el
+++ b/style/exam.el
@@ -1,6 +1,6 @@
 ;;; exam.el --- AUCTeX style for the (LaTeX) exam class
 
-;; Copyright (C) 2016--2018 Free Software Foundation, Inc.
+;; Copyright (C) 2016--2020 Free Software Foundation, Inc.
 
 ;; Author: Uwe Brauer <address@hidden>
 ;; Created: 2016-03-06
@@ -60,6 +60,9 @@ Item inserted depends on the environment."
           "subpart")
          ((string= environment "subsubparts")
           "subsubpart")
+        ((member environment '("choices" "oneparchoices"
+                               "checkboxes" "oneparcheckboxes"))
+         "choice")
          ;; Fallback
          (t "item"))))
 
@@ -94,6 +97,10 @@ Arguments NAME and TYPE are the same as for the function
    (LaTeX-add-environments
     '("solution" [ "Height" ])
     '("select")
+    '("choices" LaTeX-env-item)
+    '("oneparchoices" LaTeX-env-item)
+    '("checkboxes" LaTeX-env-item)
+    '("oneparcheckboxes" LaTeX-env-item)
     '("solutionorbox" [ "Height" ])
     '("solutionorlines" [ "Height" ])
     '("solutionordottedlines" [ "Height" ])
@@ -104,10 +111,14 @@ Arguments NAME and TYPE are the same as for the function
     '("subsubparts" LaTeX-env-item))
 
    ;; Tell AUCTeX about special environments:
-   (let ((envs '("questions" "parts" "subparts" "subsubparts")))
+   (let ((envs '("questions"
+                "parts"      "subparts"         "subsubparts"
+                "choices"    "oneparchoices"
+                "checkboxes" "oneparcheckboxes")))
      (dolist (env envs)
        (add-to-list 'LaTeX-item-list
-                    (cons env 'LaTeX-exam-insert-item))))
+                    (cons env 'LaTeX-exam-insert-item)
+                   t)))
 
    ;; Append us only once:
    (unless (and (string-match "question" LaTeX-item-regexp)
@@ -229,7 +240,7 @@ Arguments NAME and TYPE are the same as for the function
     '("checkboxchar" 1)
     '("checkboxeshook" 0)
     '("checkedchar" 1)
-    '("choice" 0)
+    '("choice" (TeX-arg-literal " "))
     '("choicelabel" 0)
     '("choiceshook" 0)
     '("chpgword" 1)

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

Summary of changes:
 style/exam.el | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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