Function: connection-local-set-profiles

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

Signature

(connection-local-set-profiles CRITERIA &rest PROFILES)

Documentation

Add PROFILES for CRITERIA.

CRITERIA is a plist identifying a connection and the application using this connection, see connection-local-criteria-alist. PROFILES are the names of connection profiles (a symbol).

When a connection to a remote server is opened and CRITERIA matches to that server, the connection-local variables from PROFILES are applied to the corresponding process buffer. The variables for a connection profile are defined using connection-local-set-profile-variables.

Source Code

;; Defined in /usr/src/emacs/lisp/files-x.el.gz
;;;###autoload
(defun connection-local-set-profiles (criteria &rest profiles)
  "Add PROFILES for CRITERIA.
CRITERIA is a plist identifying a connection and the application
using this connection, see `connection-local-criteria-alist'.
PROFILES are the names of connection profiles (a symbol).

When a connection to a remote server is opened and CRITERIA
matches to that server, the connection-local variables from
PROFILES are applied to the corresponding process buffer.  The
variables for a connection profile are defined using
`connection-local-set-profile-variables'."
  (unless (listp criteria)
    (error "Wrong criteria `%s'" criteria))
  (dolist (profile profiles)
    (unless (assq profile connection-local-profile-alist)
      (error "No such connection profile `%s'" (symbol-name profile))))
  (let* ((criteria (connection-local-normalize-criteria criteria))
         (slot (assoc criteria connection-local-criteria-alist)))
    (if slot
        (setcdr slot (delete-dups (append (cdr slot) profiles)))
      (setq connection-local-criteria-alist
            (cons (cons criteria (delete-dups profiles))
		  connection-local-criteria-alist)))))