;; Copyright (C) 1987, 1988, 1989, 1990, 1992, 1993,
;; 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002,
-;; 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
(eval-when-compile (require 'cl))
-(eval-and-compile
- (autoload 'auth-source-user-or-password "auth-source"))
+(autoload 'auth-source-user-or-password "auth-source")
(defgroup nntp nil
"NNTP access for Gnus."
(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
+ (auth-info
+ (auth-source-user-or-password '("login" "password") nntp-address "nntp"))
+ (auth-user (nth 0 auth-info))
+ (auth-passwd (nth 1 auth-info))
+ (user (or
;; this is preferred to netrc-*
- (auth-source-user-or-password "login" nntp-address "nntp")
- (netrc-get alist "login")
+ auth-user
+ (netrc-get alist "login")
nntp-authinfo-user))
(passwd (or
;; this is preferred to netrc-*
- (auth-source-user-or-password "password" nntp-address "nntp")
+ auth-passwd
(netrc-get alist "password"))))
(when (or (not send-if-force)
force)
(defun nntp-open-network-stream (buffer)
(open-network-stream "nntpd" buffer nntp-address nntp-port-number))
-(eval-and-compile
- (autoload 'format-spec "format-spec")
- (autoload 'format-spec-make "format-spec")
- (autoload 'open-tls-stream "tls"))
+(autoload 'format-spec "format-spec")
+(autoload 'format-spec-make "format-spec")
+(autoload 'open-tls-stream "tls")
(defun nntp-open-ssl-stream (buffer)
(let* ((process-connection-type nil)
(make-directory (directory-file-name dir) t)
(nnheader-message 5 "Creating nntp marks directory %s" dir))))
-(eval-and-compile
- (autoload 'time-less-p "time-date"))
+(autoload 'time-less-p "time-date")
(defun nntp-marks-changed-p (group server)
(let ((file (nntp-group-pathname server group nntp-marks-file-name))