Function: connection-local-update-profile-variables

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

Signature

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

Documentation

Update the variable settings for PROFILE in-place.

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).

Unlike connection-local-set-profile-variables (which see), this function preserves the values of any existing variable definitions that aren't listed in VARIABLES.

Probably introduced at or before Emacs version 29.1.

Source Code

;; Defined in /usr/src/emacs/lisp/files-x.el.gz
;;;###autoload
(defun connection-local-update-profile-variables (profile variables)
  "Update the variable settings for PROFILE in-place.
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).

Unlike `connection-local-set-profile-variables' (which see), this
function preserves the values of any existing variable
definitions that aren't listed in VARIABLES."
  (when-let ((existing-variables
              (nreverse (connection-local-get-profile-variables profile))))
    (dolist (var variables)
      (setf (alist-get (car var) existing-variables) (cdr var)))
    (setq variables (nreverse existing-variables)))
  (connection-local-set-profile-variables profile variables))