* gnus-group.el (gnus-group-get-new-news): Use it.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 23 Oct 2004 07:45:13 +0000 (07:45 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 23 Oct 2004 07:45:13 +0000 (07:45 +0000)
* gnus-start.el (gnus-check-reasonable-setup): New function.

lisp/gnus-async.el
lisp/gnus-group.el
lisp/gnus-start.el
lisp/gnus.el

index f8de16f..96dce1f 100644 (file)
@@ -269,28 +269,29 @@ It should return non-nil if the article is to be prefetched."
          (nntp-server-buffer (current-buffer))
          (nntp-have-messaged nil)
          (tries 0))
-      (condition-case nil
-         ;; FIXME: we could stop waiting after some
-         ;; timeout, but this is the wrong place to do it.
-         ;; rather than checking time-spent-waiting, we
-         ;; should check time-since-last-output, which
-         ;; needs to be done in nntp.el.
-         (while (eq article gnus-async-current-prefetch-article)
-           (incf tries)
-           (when (nntp-accept-process-output proc)
-             (setq tries 0))
-           (when (and (not nntp-have-messaged)
-                      (= tries 3))
-             (gnus-message 5 "Waiting for async article...")
-             (setq nntp-have-messaged t)))
-       (quit
-        ;; if the user interrupted on a slow/hung connection,
-        ;; do something friendly.
-        (when (> tries 3)
-          (setq gnus-async-current-prefetch-article nil))
-        (signal 'quit nil)))
-      (when nntp-have-messaged
-       (gnus-message 5 "")))))
+      (when proc
+       (condition-case nil
+           ;; FIXME: we could stop waiting after some
+           ;; timeout, but this is the wrong place to do it.
+           ;; rather than checking time-spent-waiting, we
+           ;; should check time-since-last-output, which
+           ;; needs to be done in nntp.el.
+           (while (eq article gnus-async-current-prefetch-article)
+             (incf tries)
+             (when (nntp-accept-process-output proc)
+               (setq tries 0))
+             (when (and (not nntp-have-messaged)
+                        (= tries 3))
+               (gnus-message 5 "Waiting for async article...")
+               (setq nntp-have-messaged t)))
+         (quit
+          ;; if the user interrupted on a slow/hung connection,
+          ;; do something friendly.
+          (when (> tries 3)
+            (setq gnus-async-current-prefetch-article nil))
+          (signal 'quit nil)))
+       (when nntp-have-messaged
+         (gnus-message 5 ""))))))
 
 (defun gnus-async-delete-prefetched-entry (entry)
   "Delete ENTRY from buffer and alist."
index a5371ad..bf7be3f 100644 (file)
@@ -3628,6 +3628,7 @@ re-scanning.  If ARG is non-nil and not a number, this will force
          (gnus-get-unread-articles arg))
       (let ((gnus-read-active-file (if arg nil gnus-read-active-file)))
        (gnus-get-unread-articles arg)))
+    (gnus-check-reasonable-setup)
     (gnus-run-hooks 'gnus-after-getting-new-news-hook)
     (gnus-group-list-groups (and (numberp arg)
                                 (max (car gnus-group-list-mode) arg)))))
index a29e0e6..ba46911 100644 (file)
@@ -3106,6 +3106,23 @@ Would otherwise be an alias for `display-time-event-handler'." nil))))
         (symbol-value 'nnimap-mailbox-info)
        (make-vector 1 0)))))
 
+(defun gnus-check-reasonable-setup ()
+  ;; Check whether nnml and nnfolder share a directory.
+  (let ((actives nil))
+    (dolist (server gnus-server-alist)
+      (let* ((method (gnus-server-to-method server))
+            (active (intern (format "%s-active-file" (car method))))
+            match)
+       (when (and (member (car method) '(nnml nnfolder))
+                  (gnus-server-opened method)
+                  (boundp active))
+         (when (setq match (assoc (symbol-value active) actives))
+           (display-warning
+            :warning (format "%s and %s share the same active file %s"
+                             (car method)
+                             (cadr match)
+                             (car match))))
+         (push (list (symbol-value active) method) actives))))))
 
 (provide 'gnus-start)
 
index 3b3fe23..c7da0f1 100644 (file)
@@ -2755,7 +2755,8 @@ gnus-registry.el will populate this if it's loaded.")
       gnus-mime-view-all-parts)
      ("gnus-int" gnus-request-type)
      ("gnus-start" gnus-newsrc-parse-options gnus-1 gnus-no-server-1
-      gnus-dribble-enter gnus-read-init-file gnus-dribble-touch)
+      gnus-dribble-enter gnus-read-init-file gnus-dribble-touch
+      gnus-check-reasonable-setup)
      ("gnus-dup" gnus-dup-suppress-articles gnus-dup-unsuppress-article
       gnus-dup-enter-articles)
      ("gnus-range" gnus-copy-sequence)