*** empty log message ***
[gnus] / lisp / gnus-int.el
index c4e85f1..9d31183 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-int.el --- backend interface functions for Gnus
-;; Copyright (C) 1996,97 Free Software Foundation, Inc.
+;; Copyright (C) 1996,97,98 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
 ;; Keywords: news
@@ -30,7 +30,7 @@
 (require 'gnus)
 
 (defcustom gnus-open-server-hook nil
-  "Hook called just before opening connection to the news server."
+  "*Hook called just before opening connection to the news server."
   :group 'gnus-start
   :type 'hook)
 
@@ -86,7 +86,7 @@ If CONFIRM is non-nil, the user will be asked for an NNTP server."
        (t
        (require 'nntp)))
       (setq gnus-current-select-method gnus-select-method)
-      (run-hooks 'gnus-open-server-hook)
+      (gnus-run-hooks 'gnus-open-server-hook)
       (or
        ;; gnus-open-server-hook might have opened it
        (gnus-server-opened gnus-select-method)
@@ -121,7 +121,7 @@ If it is down, start it up (again)."
        (gnus-message 5 "Opening %s server%s..." (car method)
                      (if (equal (nth 1 method) "") ""
                        (format " on %s" (nth 1 method)))))
-      (run-hooks 'gnus-open-server-hook)
+      (gnus-run-hooks 'gnus-open-server-hook)
       (prog1
          (gnus-open-server method)
        (unless silent
@@ -361,12 +361,13 @@ If BUFFER, insert the article in that group."
 (defun gnus-request-scan (group gnus-command-method)
   "Request a SCAN being performed in GROUP from GNUS-COMMAND-METHOD.
 If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
-  (let ((gnus-command-method
-        (if group (gnus-find-method-for-group group) gnus-command-method))
-       (gnus-inhibit-demon t))
-    (funcall (gnus-get-function gnus-command-method 'request-scan)
-            (and group (gnus-group-real-name group))
-            (nth 1 gnus-command-method))))
+  (when gnus-plugged
+    (let ((gnus-command-method
+          (if group (gnus-find-method-for-group group) gnus-command-method))
+         (gnus-inhibit-demon t))
+      (funcall (gnus-get-function gnus-command-method 'request-scan)
+              (and group (gnus-group-real-name group))
+              (nth 1 gnus-command-method)))))
 
 (defsubst gnus-request-update-info (info gnus-command-method)
   "Request that GNUS-COMMAND-METHOD update INFO."
@@ -391,7 +392,7 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
             article (gnus-group-real-name group)
             (nth 1 gnus-command-method) accept-function last)))
 
-(defun gnus-request-accept-article (group gnus-command-method &optional last)
+(defun gnus-request-accept-article (group &optional gnus-command-method last)
   ;; Make sure there's a newline at the end of the article.
   (when (stringp gnus-command-method)
     (setq gnus-command-method (gnus-server-to-method gnus-command-method)))