Function: tramp-completion-make-tramp-file-name

tramp-completion-make-tramp-file-name is a byte-compiled function defined in tramp.el.gz.

Signature

(tramp-completion-make-tramp-file-name METHOD USER HOST LOCALNAME)

Documentation

Construct a Tramp file name from METHOD, USER, HOST and LOCALNAME.

It must not be a complete Tramp file name, but as long as there are necessary only. This function will be used in file name completion.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-completion-make-tramp-file-name (method user host localname)
  "Construct a Tramp file name from METHOD, USER, HOST and LOCALNAME.
It must not be a complete Tramp file name, but as long as there are
necessary only.  This function will be used in file name completion."
  (concat tramp-prefix-format
	  (unless (or (tramp-string-empty-or-nil-p method)
                      (string-empty-p tramp-postfix-method-format))
            (concat method tramp-postfix-method-format))
          (unless (tramp-string-empty-or-nil-p user)
	    (concat user tramp-postfix-user-format))
	  (unless (tramp-string-empty-or-nil-p host)
	    (concat
	     (if (string-match-p tramp-ipv6-regexp host)
		 (concat
		  tramp-prefix-ipv6-format host tramp-postfix-ipv6-format)
	       host)
	     tramp-postfix-host-format))
	  localname))