diff options
author | Miles Bader <miles@gnu.org> | 2008-05-10 05:34:55 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2008-05-10 05:34:55 +0000 |
commit | 11f309d6352bc3461e47c0049fd4569db2186700 (patch) | |
tree | 0178e05ed4379c38886fb9dee979636bde47123a /lisp/gnus/nntp.el | |
parent | 021092eb8747fd629c912f20096e9aa06e915c93 (diff) | |
download | emacs-11f309d6352bc3461e47c0049fd4569db2186700.tar.gz |
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1153
Diffstat (limited to 'lisp/gnus/nntp.el')
-rw-r--r-- | lisp/gnus/nntp.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 02b2f6f713c..ea053531b9a 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -36,6 +36,9 @@ (eval-when-compile (require 'cl)) +(eval-and-compile + (autoload 'auth-source-user-or-password "auth-source")) + (defgroup nntp nil "NNTP access for Gnus." :group 'gnus) @@ -1177,8 +1180,15 @@ If SEND-IF-FORCE, only send authinfo to the server if the (let* ((list (netrc-parse nntp-authinfo-file)) (alist (netrc-machine list nntp-address "nntp")) (force (or (netrc-get alist "force") nntp-authinfo-force)) - (user (or (netrc-get alist "login") nntp-authinfo-user)) - (passwd (netrc-get alist "password"))) + (user (or + ;; this is preferred to netrc-* + (auth-source-user-or-password "login" nntp-address "nntp") + (netrc-get alist "login") + nntp-authinfo-user)) + (passwd (or + ;; this is preferred to netrc-* + (auth-source-user-or-password "password" nntp-address "nntp") + (netrc-get alist "password")))) (when (or (not send-if-force) force) (unless user |