Function: tramp-set-syntax

tramp-set-syntax is a byte-compiled function defined in tramp.el.gz.

Signature

(tramp-set-syntax SYMBOL VALUE)

Documentation

Set SYMBOL to value VALUE.

Used in user option tramp-syntax. There are further variables to be set, depending on VALUE.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-set-syntax (symbol value)
  "Set SYMBOL to value VALUE.
Used in user option `tramp-syntax'.  There are further variables
to be set, depending on VALUE."
  ;; Check allowed values.
  (unless (memq value (tramp-syntax-values))
    (tramp-user-error nil "Wrong `tramp-syntax' %s" value))
  ;; Cleanup existing buffers.
  (unless (eq (symbol-value symbol) value)
    (tramp-cleanup-all-buffers))
  ;; Set the value.
  (set-default symbol value)
  ;; Reset the depending variables.
  (setq tramp-prefix-format (tramp-build-prefix-format)
	tramp-prefix-regexp (tramp-build-prefix-regexp)
	tramp-method-regexp (tramp-build-method-regexp)
	tramp-postfix-method-format (tramp-build-postfix-method-format)
	tramp-postfix-method-regexp (tramp-build-postfix-method-regexp)
	tramp-prefix-ipv6-format (tramp-build-prefix-ipv6-format)
	tramp-prefix-ipv6-regexp (tramp-build-prefix-ipv6-regexp)
	tramp-postfix-ipv6-format (tramp-build-postfix-ipv6-format)
	tramp-postfix-ipv6-regexp (tramp-build-postfix-ipv6-regexp)
	tramp-postfix-host-format (tramp-build-postfix-host-format)
	tramp-postfix-host-regexp (tramp-build-postfix-host-regexp)
	tramp-host-with-port-regexp (tramp-build-host-with-port-regexp)
	tramp-remote-file-name-spec-regexp
	(tramp-build-remote-file-name-spec-regexp)
	tramp-file-name-structure (tramp-build-file-name-structure)
	tramp-file-name-regexp (tramp-build-file-name-regexp)
	tramp-completion-method-regexp
        (tramp-build-completion-method-regexp)
	tramp-completion-file-name-regexp
        (tramp-build-completion-file-name-regexp))
  ;; Rearrange file name handlers.
  (tramp-register-file-name-handlers))