Ihor Radchenko <yanta...@posteo.net> writes:

> Ruijie Yu <rui...@netyu.xyz> writes:
>
>>> Compiler list may also be nil.
>>
>> This should be covered by the repeat case?  Unless you want to be explicit
>> about this, in which case you can wrap it in a choice, whose first choice
>> being (const :tag “description” nil), and the second choice being the repeat
>> case.
>
> Yes, explicit tag will be better.

Updated and rebased (cleanly) onto current main.  Note that I moved the
type into a new line to keep everything below 66 columns.

>From cd9bc0751c8ab5b9a733cfbad3230d73d9642af0 Mon Sep 17 00:00:00 2001
From: Ruijie Yu <rui...@netyu.xyz>
Date: Thu, 13 Apr 2023 13:14:36 +0800
Subject: [PATCH] * lisp/org.el org-latex-packages-alist: fixed type definition

---
 lisp/org.el | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 463b4f594..bef5d0ca4 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3485,13 +3485,17 @@ Make sure that you only list packages here which:
   :group 'org-export-latex
   :set 'org-set-packages-alist
   :get 'org-get-packages-alist
-  :type '(repeat
-	  (choice
-	   (list :tag "options/package pair"
-		 (string :tag "options")
-		 (string :tag "package")
-		 (boolean :tag "Snippet"))
-	   (string :tag "A line of LaTeX"))))
+  :type
+  '(repeat
+    (choice
+     (list :tag "options/package pair"
+           (string :tag "options")
+           (string :tag "package")
+           (boolean :tag "snippet")
+           (choice
+            (const :tag "All compilers include this package" nil)
+            (repeat :tag "Only include from these compilers" string)))
+     (string :tag "A line of LaTeX"))))
 
 (defgroup org-appearance nil
   "Settings for Org mode appearance."
-- 
2.40.0

-- 
Best,


RY

[Please note that this mail might go to spam due to some
misconfiguration in my mail server -- will fix soon.]

Reply via email to