emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 3bc7b5f412: Use auth-source in tramp-parse-netrc


From: Lars Ingebrigtsen
Subject: master 3bc7b5f412: Use auth-source in tramp-parse-netrc
Date: Thu, 4 Aug 2022 11:09:58 -0400 (EDT)

branch: master
commit 3bc7b5f412c52c099f0a16ab4d7bdf000293c164
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Use auth-source in tramp-parse-netrc
    
    * lisp/auth-source.el (auth-source-netrc-parse-all): Autoload.
    
    * lisp/net/tramp.el (tramp-parse-netrc): Don't use netrc-parse,
    because it's going to be made obsolete (bug#56976).
---
 lisp/auth-source.el | 1 +
 lisp/net/tramp.el   | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index 48f9517683..f198362f10 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -909,6 +909,7 @@ Remove trailing \": \"."
 (defun auth-source--aget (alist key)
   (cdr (assoc key alist)))
 
+;;;###autoload
 (defun auth-source-netrc-parse-all (file)
   "Parse FILE and return all entries."
   (auth-source-netrc-parse :file file :allow-null t))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index aac63882ce..0446e5754a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3342,12 +3342,11 @@ Host is always \"localhost\"."
 User may be nil."
   ;; The declaration is not sufficient at runtime, because netrc.el is
   ;; not autoloaded.
-  (autoload 'netrc-parse "netrc")
   (mapcar
    (lambda (item)
      (and (assoc "machine" item)
          `(,(cdr (assoc "login" item)) ,(cdr (assoc "machine" item)))))
-   (netrc-parse filename)))
+   (auth-source-netrc-parse-all filename)))
 
 (defun tramp-parse-putty (registry-or-dirname)
   "Return a list of (user host) tuples allowed to access.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]