Function: netrc-credentials
netrc-credentials is a byte-compiled function defined in netrc.el.gz.
Signature
(netrc-credentials MACHINE &rest PORTS)
Documentation
Return a user name/password pair.
Port specifications will be prioritized in the order they are listed in the PORTS list.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/netrc.el.gz
;;;###autoload
(defun netrc-credentials (machine &rest ports)
"Return a user name/password pair.
Port specifications will be prioritized in the order they are
listed in the PORTS list."
(let ((list (with-suppressed-warnings ((obsolete netrc-parse))
(netrc-parse)))
found)
(if (not ports)
(setq found (netrc-machine list machine))
(while (and ports
(not found))
(setq found (netrc-machine list machine (pop ports)))))
(when found
(list (cdr (assoc "login" found))
(cdr (assoc "password" found))))))