auctex-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex 08f4fda5bd 06/76: * style/attachfile.el ("attach


From: Tassilo Horn
Subject: [elpa] externals/auctex 08f4fda5bd 06/76: * style/attachfile.el ("attachfile"): Replace `TeX-arg-eval'.
Date: Fri, 13 Jan 2023 14:30:41 -0500 (EST)

branch: externals/auctex
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 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 <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]