* nnspool.el (nnspool-spool-directory): Use news-path if the
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 26 Oct 2004 12:47:59 +0000 (12:47 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 26 Oct 2004 12:47:59 +0000 (12:47 +0000)
news-directory variable is not bound.

* gnus-start.el (gnus-check-reasonable-setup): Use an altanative
function instead of display-warning if it is not available.

lisp/ChangeLog
lisp/gnus-start.el
lisp/nnspool.el

index 243dc2c..1bcdd45 100644 (file)
@@ -1,3 +1,11 @@
+2004-10-26  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * nnspool.el (nnspool-spool-directory): Use news-path if the
+       news-directory variable is not bound.
+
+       * gnus-start.el (gnus-check-reasonable-setup): Use an altanative
+       function instead of display-warning if it is not available.
+
 2004-10-26  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-agent.el (gnus-agent-expire-group-1): Fix last merge from
index ba46911..f213789 100644 (file)
@@ -3108,21 +3108,39 @@ Would otherwise be an alias for `display-time-event-handler'." nil))))
 
 (defun gnus-check-reasonable-setup ()
   ;; Check whether nnml and nnfolder share a directory.
-  (let ((actives nil))
+  (let ((display-warn
+        (if (boundp 'display-warning)
+            'display-warning
+          (lambda (type message)
+            (if noninteractive
+                (message "Warning (%s): %s" type message)
+              (let (window)
+                (with-current-buffer (get-buffer-create "*Warnings*")
+                  (goto-char (point-max))
+                  (unless (bolp)
+                    (insert "\n"))
+                  (insert (format "Warning (%s): %s\n" type message))
+                  (setq window (display-buffer (current-buffer)))
+                  (set-window-start
+                   window
+                   (prog2
+                       (forward-line (- 1 (window-height window)))
+                       (point)
+                     (goto-char (point-max))))))))))
+       method active actives match)
     (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))))))
+      (setq method (gnus-server-to-method server)
+           active (intern (format "%s-active-file" (car method))))
+      (when (and (member (car method) '(nnml nnfolder))
+                (gnus-server-opened method)
+                (boundp active))
+       (when (setq match (assoc (symbol-value active) actives))
+         (funcall display-warn 'gnus-server
+                  (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 95f907f..004b875 100644 (file)
@@ -44,7 +44,10 @@ This is most commonly `inews' or `injnews'.")
   "Switches for nnspool-request-post to pass to `inews' for posting news.
 If you are using Cnews, you probably should set this variable to nil.")
 
-(defvoo nnspool-spool-directory (file-name-as-directory news-directory)
+(defvoo nnspool-spool-directory
+    (file-name-as-directory (if (boundp 'news-directory)
+                               (symbol-value 'news-directory)
+                             news-path))
   "Local news spool directory.")
 
 (defvoo nnspool-nov-directory (concat nnspool-spool-directory "over.view/")