Function: tramp-set-connection-local-variables-for-buffer

tramp-set-connection-local-variables-for-buffer is a byte-compiled function defined in tramp.el.gz.

Signature

(tramp-set-connection-local-variables-for-buffer)

Documentation

Set connection-local variables in the current buffer.

If connection-local variables are not supported by this Emacs version, the function does nothing.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(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 (tramp-tramp-file-p default-directory)
    (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)))))