Function: connection-local-set-profile-variables

connection-local-set-profile-variables is an autoloaded and byte-compiled function defined in files-x.el.gz.

Signature

(connection-local-set-profile-variables PROFILE VARIABLES)

Documentation

Map the symbol PROFILE to a list of variable settings.

VARIABLES is a list that declares connection-local variables for the connection profile. An element in VARIABLES is an alist whose elements are of the form (VAR . VALUE).

When a connection to a remote server is opened, the server's connection profiles are found. A server may be assigned a connection profile using connection-local-set-profiles. Then variables are set in the server's process buffer according to the VARIABLES list of the connection profile. The list is processed in order.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/files-x.el.gz
;;;###autoload
(defun connection-local-set-profile-variables (profile variables)
  "Map the symbol PROFILE to a list of variable settings.
VARIABLES is a list that declares connection-local variables for
the connection profile.  An element in VARIABLES is an alist
whose elements are of the form (VAR . VALUE).

When a connection to a remote server is opened, the server's
connection profiles are found.  A server may be assigned a
connection profile using `connection-local-set-profiles'.  Then
variables are set in the server's process buffer according to the
VARIABLES list of the connection profile.  The list is processed
in order."
  ;; Avoid saving the changed user option to file unless triggered
  ;; explicitly by user.  This workaround can be removed once there is
  ;; a solution for bug#63891.
  (let ((saved-value (get 'connection-local-profile-alist 'saved-value)))
    (setf (alist-get profile connection-local-profile-alist) variables)
    (custom-set-variables
     `(connection-local-profile-alist ',connection-local-profile-alist now))
    (unless saved-value
      (put 'connection-local-profile-alist 'saved-value nil))))