[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 05cd0440: Use `TeX-arg-completing-read-multiple'
From: |
Arash Esbati |
Subject: |
master 05cd0440: Use `TeX-arg-completing-read-multiple' |
Date: |
Wed, 26 Oct 2022 06:34:30 -0400 (EDT) |
branch: master
commit 05cd0440c5d72ffaf98f3b76c0cae124a420cc10
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Use `TeX-arg-completing-read-multiple'
* style/babel.el ("babel"):
* style/biblatex.el ("biblatex"):
* style/doc.el ("doc"):
* style/enumitem.el ("enumitem"):
* style/ntheorem.el ("ntheorem"):
* style/thmtools.el ("thmtools"):
* style/titleps.el ("titleps"):
* style/xcolor.el ("xcolor"): Use
`TeX-arg-completing-read-multiple' instead of `TeX-arg-eval' and
`mapconcat ...' combination.
---
style/babel.el | 21 ++++++---------------
style/biblatex.el | 8 +++-----
style/doc.el | 7 ++-----
style/enumitem.el | 20 +++++++++-----------
style/fontaxes.el | 12 +++++-------
style/ntheorem.el | 6 ++----
style/thmtools.el | 32 +++++++++++++++-----------------
style/titleps.el | 14 ++++----------
style/xcolor.el | 10 ++++------
9 files changed, 50 insertions(+), 80 deletions(-)
diff --git a/style/babel.el b/style/babel.el
index 1c89e8ff..c58ea9fa 100644
--- a/style/babel.el
+++ b/style/babel.el
@@ -286,11 +286,8 @@
'("useshorthands" "Character")
'("useshorthands*" "Character")
'("defineshorthand"
- [TeX-arg-eval mapconcat #'identity
- (TeX-completing-read-multiple
- (TeX-argument-prompt t nil "Language(s)")
- (LaTeX-babel-active-languages))
- ","]
+ [TeX-arg-completing-read-multiple (LaTeX-babel-active-languages)
+ "Language(s)"]
t nil)
'("languageshorthands" TeX-arg-babel-lang)
'("babelshorthand" "Short hand")
@@ -304,11 +301,8 @@
;; 1.14 Selecting fonts
'("babelfont"
- [TeX-arg-eval mapconcat #'identity
- (TeX-completing-read-multiple
- (TeX-argument-prompt t nil "Language(s)")
- LaTeX-babel-language-list)
- ","]
+ [TeX-arg-completing-read-multiple LaTeX-babel-language-list
+ "Language(s)"]
(TeX-arg-eval let ((fontfam (completing-read
(TeX-argument-prompt nil nil "font family")
'("rm" "sf" "tt"))))
@@ -341,11 +335,8 @@
(TeX-arg-completing-read ("soft" "hard" "repeat" "nobreak" "empty")
"Type/Text"))
'("babelhyphenation"
- [TeX-arg-eval mapconcat #'identity
- (TeX-completing-read-multiple
- (TeX-argument-prompt nil nil "Language(s)")
- LaTeX-babel-language-list)
- ","]
+ [TeX-arg-completing-read-multiple LaTeX-babel-language-list
+ "Language(s)"]
t)
;; 1.23 Selecting scripts
diff --git a/style/biblatex.el b/style/biblatex.el
index 47cdb16f..3254ce85 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -275,9 +275,8 @@ for citation keys."
;;; Global Customization
;; Setting Package Options
'("ExecuteBibliographyOptions"
- [TeX-arg-eval mapconcat #'identity
- (TeX-completing-read-multiple
- "Entry type: " LaTeX-biblatex-entrytype) ","]
+ [TeX-arg-completing-read-multiple LaTeX-biblatex-entrytype
+ "Entry type"]
(TeX-arg-key-val LaTeX-biblatex-executebibliographyoptions-options))
;;; Bibliography Commands
;; Resources
@@ -328,8 +327,7 @@ for citation keys."
'("defbibcheck" "Name" t)
;; Dynamic Entry Sets
'("defbibentryset" "Set"
- (TeX-arg-eval mapconcat #'identity (TeX-completing-read-multiple
- "Keys: " (LaTeX-bibitem-list)) ","))
+ (TeX-arg-completing-read-multiple (LaTeX-bibitem-list) "Keys"))
;;; Citation Commands
'("cite" (TeX-arg-conditional TeX-arg-cite-note-p
(["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
diff --git a/style/doc.el b/style/doc.el
index 892e5786..d57e1e05 100644
--- a/style/doc.el
+++ b/style/doc.el
@@ -275,11 +275,8 @@ percent sign at the beginning of a line before
(format "%s" file)))))
;; 2.2 Package options
- '("SetupDoc" (TeX-arg-eval mapconcat #'identity
- (TeX-completing-read-multiple
- (TeX-argument-prompt nil nil "Options")
- LaTeX-doc-package-options)
- ","))
+ '("SetupDoc" (TeX-arg-completing-read-multiple LaTeX-doc-package-options
+ "Options"))
;; 2.4 Describing the usage of macros and environments
'("DescribeMacro"
diff --git a/style/enumitem.el b/style/enumitem.el
index 51106b4c..4e0e929a 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -430,17 +430,15 @@ provided. OPTIONAL is ignored."
'("setlist" LaTeX-arg-enumitem-setlist)
;; \setlist*[<names,levels>]{<key-vals>}
- '("setlist*"
- [TeX-arg-eval mapconcat #'identity
- (TeX-completing-read-multiple
- (TeX-argument-prompt t nil "Environment(s), level(s)")
- (append
- (when (LaTeX-provided-package-options-member "enumitem"
-
"includedisplayed")
- '("trivlist"))
- (mapcar #'car (LaTeX-enumitem-newlist-list))
- '("1" "2" "3" "4")))
- ","]
+ `("setlist*"
+ [TeX-arg-completing-read-multiple
+ ,(lambda () (append
+ (when (LaTeX-provided-package-options-member "enumitem"
+
"includedisplayed")
+ '("trivlist"))
+ (mapcar #'car (LaTeX-enumitem-newlist-list))
+ '("1" "2" "3" "4")))
+ "Environment(s), level(s)"]
(TeX-arg-key-val (LaTeX-enumitem-key-val-options))) )
;; General commands:
diff --git a/style/fontaxes.el b/style/fontaxes.el
index da05bb5b..aebe4c6e 100644
--- a/style/fontaxes.el
+++ b/style/fontaxes.el
@@ -57,13 +57,11 @@
;; Figure versions
'("figureversion"
- (TeX-arg-eval mapconcat #'identity
- (TeX-completing-read-multiple
- "Style, alignment: "
- '(("text") ("osf")
- ("lining") ("lf")
- ("tabular") ("tab")
- ("proportional") ("prop"))) ","))
+ (TeX-arg-completing-read-multiple ("text" "osf"
+ "lining" "lf"
+ "tabular" "tab"
+ "proportional" "prop")
+ "Style, alignment"))
'("txfigures" -1) ; style: text figures (osf)
'("lnfigures" -1) ; style: lining figures
'("tbfigures" -1) ; alignment: tabular figures
diff --git a/style/ntheorem.el b/style/ntheorem.el
index a487dfc8..aa28c31f 100644
--- a/style/ntheorem.el
+++ b/style/ntheorem.el
@@ -324,10 +324,8 @@ make them available as new environments. Update
;; 2.4 Generating Theoremlists
'("listtheorems"
- (TeX-arg-eval mapconcat #'identity
- (TeX-completing-read-multiple
- "Lists: "
- (LaTeX-ntheorem-newtheorem-list)) ","))
+ (TeX-arg-completing-read-multiple (LaTeX-ntheorem-newtheorem-list)
+ "Lists"))
;; 2.4.2 Writing Extra Stuff to the Theorem File
'("addtheoremline"
diff --git a/style/thmtools.el b/style/thmtools.el
index d17b30ee..4a1067b9 100644
--- a/style/thmtools.el
+++ b/style/thmtools.el
@@ -1,6 +1,6 @@
;;; thmtools.el --- AUCTeX style for `thmtools.sty' (v0.72) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2018--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2018--2022 Free Software Foundation, Inc.
;; Author: Arash Esbati <arash@gnu.org>
;; Maintainer: auctex-devel@gnu.org
@@ -277,22 +277,20 @@ RET in order to leave it empty.")
'("declaretheorem" LaTeX-arg-thmtools-declaretheorem)
'("listoftheorems" [ LaTeX-arg-thmtools-listoftheorems ])
- '("ignoretheorems"
- (TeX-arg-eval mapconcat #'identity
- (TeX-completing-read-multiple
- (TeX-argument-prompt nil nil "Environment(s)")
- (append
- ;; check for \newtheorem from amsthm.sty:
- (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
- (LaTeX-amsthm-newtheorem-list))
- (mapcar #'car (LaTeX-amsthm-newtheorem-list)))
- ;; check for \newtheorem from ntheorem.sty:
- (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
- (LaTeX-ntheorem-newtheorem-list))
- (mapcar #'car (LaTeX-ntheorem-newtheorem-list)))
- ;; thmtools version is called \declaretheorem:
- (mapcar #'car (LaTeX-thmtools-declaretheorem-list))))
- ","))
+ `("ignoretheorems"
+ (TeX-arg-completing-read-multiple
+ ,(lambda () (append
+ ;; check for \newtheorem from amsthm.sty:
+ (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
+ (LaTeX-amsthm-newtheorem-list))
+ (mapcar #'car (LaTeX-amsthm-newtheorem-list)))
+ ;; check for \newtheorem from ntheorem.sty:
+ (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
+ (LaTeX-ntheorem-newtheorem-list))
+ (mapcar #'car (LaTeX-ntheorem-newtheorem-list)))
+ ;; thmtools version is called \declaretheorem:
+ (mapcar #'car (LaTeX-thmtools-declaretheorem-list))))
+ "Environment(s)"))
'("listtheoremname" 0))
;; Fontification
diff --git a/style/titleps.el b/style/titleps.el
index ad8646e0..67891035 100644
--- a/style/titleps.el
+++ b/style/titleps.el
@@ -107,18 +107,12 @@ Removal is based on the return value of function
'("setfoot*" 3)
'("settitlemarks"
- (TeX-arg-eval mapconcat #'identity
- (TeX-completing-read-multiple
- (TeX-argument-prompt nil nil "Level names")
- (LaTeX-titleps-section-command-list))
- ","))
+ (TeX-arg-completing-read-multiple (LaTeX-titleps-section-command-list)
+ "Level names"))
'("settitlemarks"
- (TeX-arg-eval mapconcat #'identity
- (TeX-completing-read-multiple
- (TeX-argument-prompt nil nil "Level names")
- (LaTeX-titleps-section-command-list))
- ","))
+ (TeX-arg-completing-read-multiple (LaTeX-titleps-section-command-list)
+ "Level names"))
'("headrule" 0)
'("setheadrule" "Thickness")
diff --git a/style/xcolor.el b/style/xcolor.el
index 455e886d..001f4086 100644
--- a/style/xcolor.el
+++ b/style/xcolor.el
@@ -557,12 +557,10 @@ xcolor package.")
;; 2.6.4 Color testing
(LaTeX-add-environments
- '("testcolors" LaTeX-env-args
- [ TeX-arg-eval mapconcat #'identity
- (TeX-completing-read-multiple
- (TeX-argument-prompt t nil "Color models")
- (LaTeX-xcolor-color-models t))
- "," ] ))
+ `("testcolors" LaTeX-env-args
+ [TeX-arg-completing-read-multiple ,(lambda ()
+ (LaTeX-xcolor-color-models t))
+ "Color models"] ))
;; Fontification
(when (and (featurep 'font-latex)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 05cd0440: Use `TeX-arg-completing-read-multiple',
Arash Esbati <=