branch: externals/auctex
commit 08f4fda5bd98608b9e384e034effc34fc4b03eb8
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>
* style/attachfile.el ("attachfile"): Replace `TeX-arg-eval'.
---
style/attachfile.el | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/style/attachfile.el b/style/attachfile.el
index c090b5a447..e3fe5eb7f6 100644
--- a/style/attachfile.el
+++ b/style/attachfile.el
@@ -1,6 +1,6 @@
;;; attachfile.el --- AUCTeX style for `attachfile.sty' (v1.6) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2015, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2015--2022 Free Software Foundation, Inc.
;; Author: Arash Esbati <[email protected]>
;; Maintainer: [email protected]
@@ -80,26 +80,26 @@
(TeX-add-symbols
;; \attachfile[<options>]{<filename>}
- '("attachfile"
+ `("attachfile"
[TeX-arg-key-val LaTeX-attachfile-key-val-options]
- (TeX-arg-eval
- (lambda ()
+ ,(lambda (optional)
(let ((atfi (file-relative-name
- (read-file-name "File to attach: "))))
- (format "%s" atfi)))))
+ (read-file-name
+ (TeX-argument-prompt optional nil "File to attach")))))
+ (TeX-argument-insert atfi optional))))
;; \noattachfile[<options>]
'("noattachfile"
[TeX-arg-key-val LaTeX-attachfile-key-val-options] )
;; \textattachfile[<options>]{<filename>}{<text>}
- '("textattachfile"
+ `("textattachfile"
[TeX-arg-key-val LaTeX-attachfile-key-val-options]
- (TeX-arg-eval
- (lambda ()
+ ,(lambda (optional)
(let ((atfi (file-relative-name
- (read-file-name "File to attach: "))))
- (format "%s" atfi))))
+ (read-file-name
+ (TeX-argument-prompt optional nil "File to attach")))))
+ (TeX-argument-insert atfi optional)))
t)
;; \notextattachfile[<options>]{<text>}