[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 513d000: * lisp/net/tramp.el (tramp-set-connection-
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master 513d000: * lisp/net/tramp.el (tramp-set-connection-local-variables-for-buffer): |
Date: |
Wed, 26 Apr 2017 03:59:57 -0400 (EDT) |
branch: master
commit 513d000c75b582edf9acef1c6df00ee2c382dcb9
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
* lisp/net/tramp.el (tramp-set-connection-local-variables-for-buffer):
New defun.
---
lisp/net/tramp.el | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 9b80c59..56a7b37 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -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.
+ (tramp-compat-funcall
+ 'hack-connection-local-variables-apply
+ `(: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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 513d000: * lisp/net/tramp.el (tramp-set-connection-local-variables-for-buffer):,
Michael Albinus <=