Fix.
[elisp/gnus.git-] / lisp / gnus-group.el
index 831e52b..275f68c 100644 (file)
@@ -38,7 +38,8 @@
 (require 'gnus-undo)
 (require 'time-date)
 (require 'gnus-ems)
-(require 'mm-url)
+
+(eval-when-compile (require 'mm-url))
 
 (defcustom gnus-group-archive-directory
   "*ftp@ftp.hpc.uh.edu:/pub/emacs/ding-list/"
@@ -1901,14 +1902,14 @@ be permanent."
      (gnus-group-prefixed-name group method) method)))
 
 ;;;###autoload
-(defun gnus-fetch-group (group)
+(defun gnus-fetch-group (group &optional articles)
   "Start Gnus if necessary and enter GROUP.
 Returns whether the fetching was successful or not."
   (interactive (list (gnus-group-completing-read-group-name
                      "Group name: " gnus-active-hashtb)))
   (unless (get-buffer gnus-group-buffer)
     (gnus-no-server))
-  (gnus-group-read-group nil nil group))
+  (gnus-group-read-group articles nil group))
 
 ;;;###autoload
 (defun gnus-fetch-group-other-frame (group)
@@ -2246,7 +2247,8 @@ doing the deletion."
          (gnus-group-goto-group group)
          (gnus-group-kill-group 1 t)
          (gnus-sethash group nil gnus-active-hashtb)
-         (when gnus-cache-active-hashtb
+         (when (and (boundp 'gnus-cache-active-hashtb)
+                    gnus-cache-active-hashtb)
            (gnus-sethash group nil gnus-cache-active-hashtb)
            (setq gnus-cache-active-altered t))
          t))
@@ -2899,10 +2901,10 @@ sort in reverse order."
 
 (defun gnus-group-sort-by-method (info1 info2)
   "Sort alphabetically by backend name."
-  (string< (symbol-name (car (gnus-find-method-for-group
-                             (gnus-info-group info1) info1)))
-          (symbol-name (car (gnus-find-method-for-group
-                             (gnus-info-group info2) info2)))))
+  (string< (car (gnus-find-method-for-group
+                (gnus-info-group info1) info1))
+          (car (gnus-find-method-for-group
+                (gnus-info-group info2) info2))))
 
 (defun gnus-group-sort-by-server (info1 info2)
   "Sort alphabetically by server name."
@@ -3548,7 +3550,7 @@ to use."
     (gnus-group-group-name)
     (when current-prefix-arg
       (completing-read
-       "Faq dir: " (and (listp gnus-group-faq-directory)
+       "FAQ dir: " (and (listp gnus-group-faq-directory)
                        (mapcar #'list
                                gnus-group-faq-directory))))))
   (unless group
@@ -3568,12 +3570,16 @@ to use."
          (setq found t))))))
 
 (defun gnus-group-fetch-charter (group)
-  "Fetch the charter for the current group."
+  "Fetch the charter for the current group.
+If given a prefix argument, prompt for a group."
   (interactive
-    (list (or (gnus-group-group-name)
-        gnus-newsgroup-name)))
+   (list (or (when current-prefix-arg
+              (completing-read "Group: " gnus-active-hashtb))
+            (gnus-group-group-name)
+            gnus-newsgroup-name)))
   (unless group
     (error "No group name given"))
+  (require 'mm-url)
   (let ((name (mm-url-form-encode-xwfu (gnus-group-real-name group)))
        url hierarchy)
     (when (string-match "\\(^[^\\.]+\\)\\..*" name)
@@ -3583,10 +3589,13 @@ to use."
        (gnus-group-fetch-control group)))))
 
 (defun gnus-group-fetch-control (group)
-  "Fetch the archived control messages for the current group."
+  "Fetch the archived control messages for the current group.
+If given a prefix argument, prompt for a group."
   (interactive
-    (list (or (gnus-group-group-name)
-        gnus-newsgroup-name)))
+   (list (or (when current-prefix-arg
+              (completing-read "Group: " gnus-active-hashtb))
+            (gnus-group-group-name)
+            gnus-newsgroup-name)))
   (unless group
     (error "No group name given"))
   (let ((name (gnus-group-real-name group))