From 17d7d83c00faaa79d0c4b30a03ff5aae30de2100 Mon Sep 17 00:00:00 2001 From: Kevin Greiner Date: Tue, 14 Jan 2003 06:09:27 +0000 Subject: [PATCH] * gnus-int.el (): Added require declarations to resolve compile-time warnings. (gnus-open-server): If the server status is set to offline, recursively execute gnus-open-server to open the offline backend (e.g. nnagent). --- lisp/gnus-int.el | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/lisp/gnus-int.el b/lisp/gnus-int.el index e52bb5e63..35368227a 100644 --- a/lisp/gnus-int.el +++ b/lisp/gnus-int.el @@ -29,6 +29,11 @@ (eval-when-compile (require 'cl)) (require 'gnus) +(require 'message) +(require 'gnus-range) + +(eval-when-compile + (defun gnus-agent-expire (a b c))) (defcustom gnus-open-server-hook nil "Hook called just before opening connection to the news server." @@ -219,12 +224,21 @@ If it is down, start it up (again)." (format "Unable to open %s:%s, go offline? " (car gnus-command-method) (cadr gnus-command-method))) - 'offline + 'offline 'denied)) 'denied))) ;; Return the result from the "open" call. - (or (eq (cadr elem) 'offline) - result))))) + (cond ((eq (cadr elem) 'offline) + ;; I'm avoiding infinite recursion by binding unopen + ;; status to denied (The logic of this routine + ;; guarantees that I can't get to this point with + ;; unopen status already bound to denied). + (unless (eq gnus-server-unopen-status 'denied) + (let ((gnus-server-unopen-status 'denied)) + (gnus-open-server gnus-command-method))) + t) + (t + result)))))) (defun gnus-close-server (gnus-command-method) "Close the connection to GNUS-COMMAND-METHOD." -- 2.34.1