Function: with-tramp-connection-property
with-tramp-connection-property is a macro defined in tramp.el.gz.
Signature
(with-tramp-connection-property KEY PROPERTY &rest BODY)
Documentation
Check in Tramp for property PROPERTY, otherwise execute BODY and set.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defmacro with-tramp-connection-property (key property &rest body)
"Check in Tramp for property PROPERTY, otherwise execute BODY and set."
(declare (indent 2) (debug t))
`(let ((value (tramp-get-connection-property
,key ,property tramp-cache-undefined)))
(when (eq value tramp-cache-undefined)
;; We cannot pass ,@body as parameter to
;; `tramp-set-connection-property' because it mangles our debug
;; messages.
(setq value (progn ,@body))
(tramp-set-connection-property ,key ,property value))
value))