Commit 513d000c authored by Michael Albinus's avatar Michael Albinus
Browse files

* lisp/net/tramp.el (tramp-set-connection-local-variables-for-buffer):

New defun.
parent 3a8388a7
......@@ -1410,6 +1410,19 @@ version, the function does nothing."
:user ,(tramp-file-name-user vec)
:machine ,(tramp-file-name-host vec)))))
(defun tramp-set-connection-local-variables-for-buffer ()
"Set connection-local variables in the current buffer.
If connection-local variables are not supported by this Emacs
version, the function does nothing."
(when (file-remote-p default-directory)
;; `hack-connection-local-variables-apply' exists since Emacs 26.1.
`(:application tramp
:protocol ,(file-remote-p default-directory 'method)
:user ,(file-remote-p default-directory 'user)
:machine ,(file-remote-p default-directory 'host)))))
(defun tramp-debug-buffer-name (vec)
"A name for the debug buffer for VEC."
(let ((method (tramp-file-name-method vec))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment