branch: externals/tramp-hlo
commit 637f06239a742cbbfc7a5e0fd21acde0ae0a8657
Author: Joe Sadusk <[email protected]>
Commit: Joe Sadusk <[email protected]>
Fix macro
---
tramp-hlo.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/tramp-hlo.el b/tramp-hlo.el
index 470d4d88b9..15cfcb24fd 100644
--- a/tramp-hlo.el
+++ b/tramp-hlo.el
@@ -117,14 +117,15 @@ a high level function. FILE is a filename that might be a
remote file with a
tramp-sh backend. If so, execute the BODY of the macro, otherwise run the
FALLBACK expression. If executing BODY, the dissected FILE will be in scope as
`vec'."
- `(if-let* ((non-essential t)
- (vec (ignore-errors
- (tramp-dissect-file-name (expand-file-name ,file))))
- ((tramp-sh-file-name-handler-p vec))
- (non-essential nil)
- )
- (progn ,@body)
- (,@fallback)
+ `(if (and-let* ((non-essential t)
+ (vec (ignore-errors
+ (tramp-dissect-file-name (expand-file-name ,file))))
+ (is-sh (tramp-sh-file-name-handler-p vec))
+ )
+ vec)
+
+ (with-parsed-tramp-file-name ,file vec ,@body)
+ (,@fallback)
)
)