(gnus-group-make-shimbun-group): New function; import from T-gnus.
authorkeiichi <keiichi>
Thu, 25 May 2000 05:13:50 +0000 (05:13 +0000)
committerkeiichi <keiichi>
Thu, 25 May 2000 05:13:50 +0000 (05:13 +0000)
lisp/gnus-group.el

index 64d1881..01d111e 100644 (file)
@@ -2191,6 +2191,33 @@ If SOLID (the prefix), create a solid group."
                       (nnwarchive-login ,login))))
     (gnus-group-make-group group method)))
 
+(defvar nnshimbun-type-definition)
+(defvar gnus-group-shimbun-server-history nil)
+
+(defun gnus-group-make-shimbun-group ()
+  "Create a nnshimbun group."
+  (interactive)
+  (require 'nnshimbun)
+  (let* ((minibuffer-setup-hook (append minibuffer-setup-hook
+                                       '(beginning-of-line)))
+        (server (completing-read
+                 "Shimbun address: "
+                 (mapcar (lambda (elem) (list (car elem)))
+                         nnshimbun-type-definition)
+                 nil t
+                 (or (car gnus-group-shimbun-server-history)
+                     (caar nnshimbun-type-definition))
+                 'gnus-group-shimbun-server-history))
+        (group (completing-read
+                "Group name: "
+                (mapcar (lambda (elem) (list elem))
+                        (cdr (assq 'groups
+                                   (cdr (assoc server
+                                               nnshimbun-type-definition)))))
+                nil t nil))
+        (nnshimbun-pre-fetch-article nil))
+    (gnus-group-make-group group `(nnshimbun ,server))))
+
 (defun gnus-group-make-archive-group (&optional all)
   "Create the (ding) Gnus archive group of the most recent articles.
 Given a prefix, create a full group."