auctex-diffs
[Top][All Lists]
Advanced

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

master 08f4fda5 2/3: * style/attachfile.el ("attachfile"): Replace `TeX-


From: Arash Esbati
Subject: master 08f4fda5 2/3: * style/attachfile.el ("attachfile"): Replace `TeX-arg-eval'.
Date: Mon, 21 Nov 2022 07:01:54 -0500 (EST)

branch: master
commit 08f4fda5bd98608b9e384e034effc34fc4b03eb8
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    * 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 c090b5a4..e3fe5eb7 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 <arash@gnu.org>
 ;; Maintainer: auctex-devel@gnu.org
@@ -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>}



reply via email to

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