[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex c7de94dc94 24/76: Replace `TeX-arg-eval'
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex c7de94dc94 24/76: Replace `TeX-arg-eval' |
Date: |
Fri, 13 Jan 2023 14:30:58 -0500 (EST) |
branch: externals/auctex
commit c7de94dc942f77b4159a5c3fb5d0c57eebe8cc9e
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Replace `TeX-arg-eval'
* style/doc.el ("doc"): Replace `TeX-arg-eval' with closure.
For "DocInput", add a check if "l3doc" style is loaded and adjust
the query accordingly.
* style/l3doc.el ("l3doc"): Remove entry for "DocInput"
incl. fontification which is done inside "doc.el".
---
style/doc.el | 59 ++++++++++++++++++++++++++++++++--------------------------
style/l3doc.el | 12 ++----------
2 files changed, 35 insertions(+), 36 deletions(-)
diff --git a/style/doc.el b/style/doc.el
index d57e1e05b1..cb210be346 100644
--- a/style/doc.el
+++ b/style/doc.el
@@ -249,44 +249,52 @@ percent sign at the beginning of a line before
'("theglossary" LaTeX-env-item))
(TeX-add-symbols
- ;; 2.1 The driver file
- '("DocInput"
- (TeX-arg-eval
- (lambda ()
+ ;; 2.1 The driver file: Note that `l3doc.el' also loads `doc.el'
+ ;; but `\DocInput' behaves differently. With `l3doc.el', it takes
+ ;; comma-separated arguments, with `doc.el' it takes only one
+ ;; argument.
+ `("DocInput"
+ (TeX-arg-conditional (member "l3doc" (TeX-style-list))
+ (,(lambda (optional)
+ (let ((file (TeX-read-string
+ (TeX-argument-prompt optional nil
+ (format "File(s) to input
(default %s)"
+ (buffer-name)))
+ nil nil (buffer-name))))
+ (TeX-argument-insert file optional))))
+ (,(lambda (optional)
+ (let ((file (file-relative-name
+ (read-file-name
+ (TeX-argument-prompt optional nil
+ (format "File to input (default
%s)"
+ (buffer-name)))
+ nil (buffer-name) nil nil
+ (lambda (x)
+ (or (file-directory-p x)
+ (string-match "\\.\\(fdd\\|dtx\\)\\'" x))))
+ (TeX-master-directory))))
+ (TeX-argument-insert file optional))))))
+
+ `("IndexInput"
+ ,(lambda (optional)
(let ((file (file-relative-name
(read-file-name
- "File to input: " nil nil nil nil
- (lambda (x)
- (or (file-directory-p x)
- (string-match "\\.\\(fdd\\|dtx\\)\\'" x))))
- (TeX-master-directory))))
- (format "%s" file)))))
-
- '("IndexInput"
- (TeX-arg-eval
- (lambda ()
- (let ((file (file-relative-name
- (read-file-name
- "File to input: " nil nil nil nil
+ (TeX-argument-prompt optional nil "File to input")
+ nil nil nil nil
(lambda (x)
(or (file-directory-p x)
(string-match "\\.\\(tex\\|ltx\\|fdd\\|dtx\\)\\'"
x))))
(TeX-master-directory))))
- (format "%s" file)))))
+ (TeX-argument-insert file optional))))
;; 2.2 Package options
'("SetupDoc" (TeX-arg-completing-read-multiple LaTeX-doc-package-options
"Options"))
;; 2.4 Describing the usage of macros and environments
- '("DescribeMacro"
+ `("DescribeMacro"
[TeX-arg-completing-read ("noindex" "noprint") "Suppress option"]
- (TeX-arg-eval
- (lambda ()
- (let ((name (TeX-read-string
- (TeX-argument-prompt nil nil "Macro")
- TeX-esc)))
- (format "%s" name)))))
+ (TeX-arg-string "Macro" ,TeX-esc))
'("DescribeEnv"
[TeX-arg-completing-read ("noindex" "noprint") "Suppress option"]
"Environment")
@@ -434,7 +442,6 @@ percent sign at the beginning of a line before
(font-latex-add-keywords '(("meta" "{"))
'textual)
(font-latex-add-keywords '(("DocInput" "{")
- ("DocInclude" "{" )
("IndexInput" "{"))
'reference)))
TeX-dialect)
diff --git a/style/l3doc.el b/style/l3doc.el
index de11ee0fa3..a13f2179d3 100644
--- a/style/l3doc.el
+++ b/style/l3doc.el
@@ -186,13 +186,7 @@ For syntax environment from l3doc class."
'("NB" "Tag" t)
- '("DocInput"
- (TeX-arg-eval
- (lambda ()
- (let ((file (TeX-read-string
- (format "File(s) to include (default %s): "
(current-buffer))
- nil nil (current-buffer))))
- (format "%s" file)))))
+ ;; "DocInput": This macro is supplied in `doc.el'
;; 4.5 Describing functions in the implementation
'("TestFiles" "File(s)")
@@ -245,9 +239,7 @@ For syntax environment from l3doc class."
("TestFiles" "{")
("UnitTested" "")
("TestMissing" "{"))
- 'function)
- (font-latex-add-keywords '("DocInput" "{")
- 'reference)))
+ 'function)))
TeX-dialect)
(defvar LaTeX-l3doc-class-options
- [elpa] externals/auctex 358b4d0785 76/76: Merge remote-tracking branch 'origin/master' into externals/auctex, (continued)
- [elpa] externals/auctex 358b4d0785 76/76: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 4700af5dd4 64/76: ; Delete ineffective string escapes reported by Relint, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex dc6e8c44c9 72/76: Turn `y-or-n-p' into `always' for in-buffer completion, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 13c77f998e 28/76: Simplify implementation of style/empheq.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex ff65b9b4d0 65/76: Avoid compiler warnings with long function names, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 324cb5c913 41/76: Simplify implementation of style/hologo.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 3806176ba2 56/76: Fix argument description in doc strings, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 517d5a6e4e 34/76: ; * style/floatrow.el ("floatrow"): Fix last change., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex ac7ad4fff4 36/76: Simplify implementation of style/footmisc.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex d7dc696f47 25/76: * latex.el (LaTeX-env-contents): Add the "nowarn" key., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex c7de94dc94 24/76: Replace `TeX-arg-eval',
Tassilo Horn <=
- [elpa] externals/auctex 33bb54bb9e 38/76: Simplify implementation of style/geometry.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 5c67eb2dfd 07/76: Simplify implementation of style/babel.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex e97fb94f4e 62/76: Pacify compiler warning, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 22336f15bd 52/76: Simplify implementation of style/mathtools.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex bf66b302a4 61/76: Improve the previous commit slightly, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 5484b57bc4 31/76: Don't rely on the value of `LaTeX-current-environment', Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 1def8bd570 39/76: ; * style/graphics.el ("graphics"): Remove unnecessary `function'., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 0cea7e107a 21/76: Simplify implementation of style/cleveref.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 6bdb392dfe 01/76: ; * style/theorem.el ("theorem"): Fix last change., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex eb7b8d4de4 44/76: * style/listings.el ("listings"): Replace `TeX-arg-eval'., Tassilo Horn, 2023/01/13