From 4d944f6ddbac8f001ee6964c9b4a154debd76558 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 22 Mar 2021 17:47:45 +0100 Subject: [PATCH] * lisp/files-x.el (connection-local-criteria-for-default-directory): Add optional argument APPLICATION. --- lisp/files-x.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/files-x.el b/lisp/files-x.el index 526a128623c..23e4562f4b1 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -699,13 +699,14 @@ will not be changed." (copy-tree connection-local-variables-alist))) (hack-local-variables-apply))) -(defsubst connection-local-criteria-for-default-directory () - "Return a connection-local criteria, which represents `default-directory'." +(defsubst connection-local-criteria-for-default-directory (&optional application) + "Return a connection-local criteria, which represents `default-directory'. +If APPLICATION is nil, the symbol `tramp' is used." (when (file-remote-p default-directory) - `(:application tramp - :protocol ,(file-remote-p default-directory 'method) - :user ,(file-remote-p default-directory 'user) - :machine ,(file-remote-p default-directory 'host)))) + `(:application ,(or application 'tramp) + :protocol ,(file-remote-p default-directory 'method) + :user ,(file-remote-p default-directory 'user) + :machine ,(file-remote-p default-directory 'host)))) ;;;###autoload (defmacro with-connection-local-variables (&rest body) -- 2.39.5