emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex 0d79074 30/43: Add support for some missing envi


From: Tassilo Horn
Subject: [elpa] externals/auctex 0d79074 30/43: Add support for some missing environments
Date: Sat, 11 Apr 2020 15:05:23 -0400 (EDT)

branch: externals/auctex
commit 0d790743293bf6f21fa2dc9e09eff0729e59c8e0
Author: Uwe Brauer <address@hidden>
Commit: Arash Esbati <address@hidden>

    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>
---
 style/exam.el | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

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)



reply via email to

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