Function: tramp-get-method-parameter

tramp-get-method-parameter is a byte-compiled function defined in tramp.el.gz.

Signature

(tramp-get-method-parameter VEC PARAM &optional DEFAULT)

Documentation

Return the method parameter PARAM.

If VEC is a vector, check first in connection properties. Afterwards, check in tramp-methods. If the tramp-methods entry does not exist, return DEFAULT.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-get-method-parameter (vec param &optional default)
  "Return the method parameter PARAM.
If VEC is a vector, check first in connection properties.
Afterwards, check in `tramp-methods'.  If the `tramp-methods'
entry does not exist, return DEFAULT."
  (let ((hash-entry
	 (replace-regexp-in-string (rx bos "tramp-") "" (symbol-name param))))
    (if (tramp-connection-property-p vec hash-entry)
	;; We use the cached property.
	(tramp-get-connection-property vec hash-entry)
      ;; Use the static value from `tramp-methods'.
      (if-let* ((methods-entry
		 (assoc
		  param (assoc (tramp-file-name-method vec) tramp-methods))))
	  (cadr methods-entry)
	;; Return the default value.
	default))))