[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/nntp.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/nntp.el,v |
Date: |
Sat, 10 May 2008 05:34:58 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 08/05/10 05:34:55
Index: nntp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/nntp.el,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- nntp.el 6 May 2008 03:55:08 -0000 1.43
+++ nntp.el 10 May 2008 05:34:55 -0000 1.44
@@ -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 @@
(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