[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/buffer-env d5fbf1d173 2/2: Refinement to a call to read
From: |
ELPA Syncer |
Subject: |
[elpa] externals/buffer-env d5fbf1d173 2/2: Refinement to a call to read-file-name |
Date: |
Wed, 16 Mar 2022 16:57:18 -0400 (EDT) |
branch: externals/buffer-env
commit d5fbf1d173da54fd8609b2ea10832d871021feec
Author: Augusto Stoffel <arstoffel@gmail.com>
Commit: Augusto Stoffel <arstoffel@gmail.com>
Refinement to a call to read-file-name
---
buffer-env.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/buffer-env.el b/buffer-env.el
index 63b6fbe2fb..0b54c0cf12 100644
--- a/buffer-env.el
+++ b/buffer-env.el
@@ -146,9 +146,11 @@ happens if no such file is found. This makes this function
suitable for use in a normal hook.
When called interactively, ask for a FILE."
- (interactive (list (let ((file (buffer-env--locate-script)))
- (read-file-name "Environment script: "
- file file t))))
+ (interactive
+ (list (let ((file (buffer-env--locate-script)))
+ (read-file-name (format-prompt "Environment script"
+ (when file (file-relative-name
file)))
+ nil file t))))
(when-let* ((file (if file
(expand-file-name file)
(buffer-env--locate-script)))