From 22f0159c5aa8aca3d650505b41adfbd03f719b11 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 7 Feb 2023 19:28:15 +0100 Subject: [PATCH] Fix last Tramp commit * lisp/net/tramp.el (tramp-completion-file-name-handler): Run only when `minibuffer-completing-file-name' is non-nil. * test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion): Fix test. --- lisp/net/tramp.el | 2 +- test/lisp/net/tramp-tests.el | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 69812506e48..b75a1816fdb 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2773,7 +2773,7 @@ Fall back to normal file name handler if no Tramp file name handler exists." "Invoke Tramp file name completion handler for OPERATION and ARGS. Falls back to normal file name handler if no Tramp file name handler exists." (if-let - ((fn (and tramp-mode + ((fn (and tramp-mode minibuffer-completing-file-name (assoc operation tramp-completion-file-name-handler-alist)))) (save-match-data (apply (cdr fn) args)) (tramp-run-real-handler operation args))) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index d903ba626b9..eea59843d47 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4524,7 +4524,8 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (let ((tramp-fuse-remove-hidden-files t) (method (file-remote-p ert-remote-temporary-file-directory 'method)) (host (file-remote-p ert-remote-temporary-file-directory 'host)) - (orig-syntax tramp-syntax)) + (orig-syntax tramp-syntax) + (minibuffer-completing-file-name t)) (when (and (stringp host) (string-match tramp-host-with-port-regexp host)) (setq host (match-string 1 host))) -- 2.39.5