Synch to Gnus 200311112008.
[elisp/gnus.git-] / lisp / gnus.el
index 049e7bd..4d5fe91 100644 (file)
@@ -1186,7 +1186,8 @@ see the manual for details."
 This should be a mail method."
   :group 'gnus-server
   :group 'gnus-message
-  :type 'gnus-select-method)
+  :type '(choice (const :tag "Default archive method" "archive")
+                gnus-select-method))
 
 (defcustom gnus-message-archive-group nil
   "*Name of the group in which to save the messages you've written.
@@ -1296,7 +1297,7 @@ list, Gnus will try all the methods in the list until it finds a match."
     "/ftp@rtfm.mit.edu:/pub/usenet/"
     "/ftp@ftp.uni-paderborn.de:/pub/FAQ/"
     "/ftp@ftp.sunet.se:/pub/usenet/"
-    "/ftp@nctuccca.edu.tw:/USENET/FAQ/"
+    "/ftp@nctuccca.nctu.edu.tw:/pub/Documents/rtfm/usenet-by-group/"
     "/ftp@hwarang.postech.ac.kr:/pub/usenet/"
     "/ftp@ftp.hk.super.net:/mirror/faqs/")
   "*Directory where the group FAQs are stored.
@@ -1320,7 +1321,7 @@ If the default site is too slow, try one of these:
                  src.doc.ic.ac.uk               /usenet/news-FAQS
                  ftp.sunet.se                   /pub/usenet
                  ftp.pasteur.fr                 /pub/FAQ
-   Asia:         nctuccca.edu.tw                /USENET/FAQ
+   Asia:         nctuccca.nctu.edu.tw           /pub/Documents/rtfm/usenet-by-group/
                  hwarang.postech.ac.kr          /pub/usenet
                  ftp.hk.super.net               /mirror/faqs"
   :group 'gnus-group-various
@@ -1336,12 +1337,11 @@ If the default site is too slow, try one of these:
     ("europa" . (concat "http://www.europa.usenet.eu.org/chartas/charta-en-"
                        (gnus-replace-in-string name "europa\\." "") ".html"))
     ("nl" . (concat "http://www.xs4all.nl/~sister/usenet/charters/" name))
-    ("aus" . (concat "http://aus.news-admin.org/groupinfo.php/" name))
+    ("aus" . (concat "http://aus.news-admin.org/groupinfo.cgi/" name))
     ("pl" . (concat "http://www.usenet.pl/opisy/" name))
     ("ch" . (concat "http://www.use-net.ch/Usenet/charter.html#" name))
     ("at" . (concat "http://www.usenet.at/chartas/" name "/charta"))
     ("uk" . (concat "http://www.usenet.org.uk/" name ".html"))
-    ("wales" . (concat "http://www.wales-usenet.org/english/groups/" name ".html"))
     ("dfw" . (concat "http://www.cirr.com/dfw/charters/" name ".html"))
     ("se" . (concat "http://www.usenet-se.net/Reglementen/"
                    (gnus-replace-in-string name "\\." "_") ".html"))
@@ -1923,25 +1923,27 @@ Only applicable to non-spam (unclassified and ham) groups.")
   (gnus-define-group-parameter
    spam-process
    :type list
-   :parameter-type '(choice :tag "Spam Summary Exit Processor"
-                           :value nil
-                           (list :tag "Spam Summary Exit Processor Choices"
-                                 (set
-                                  (variable-item gnus-group-spam-exit-processor-ifile)
-                                  (variable-item gnus-group-spam-exit-processor-stat)
-                                  (variable-item gnus-group-spam-exit-processor-bogofilter)
-                                  (variable-item gnus-group-spam-exit-processor-blacklist)
-                                  (variable-item gnus-group-spam-exit-processor-report-gmane)
-                                  (variable-item gnus-group-spam-exit-processor-spamoracle)
-                                  (variable-item gnus-group-ham-exit-processor-bogofilter)
-                                  (variable-item gnus-group-ham-exit-processor-ifile)
-                                  (variable-item gnus-group-ham-exit-processor-stat)
-                                  (variable-item gnus-group-ham-exit-processor-whitelist)
-                                  (variable-item gnus-group-ham-exit-processor-BBDB)
-                                  (variable-item gnus-group-ham-exit-processor-copy)
-                                  (variable-item gnus-group-ham-exit-processor-spamoracle))))
+   :parameter-type 
+   '(choice 
+     :tag "Spam Summary Exit Processor"
+     :value nil
+     (list :tag "Spam Summary Exit Processor Choices"
+          (set
+           (variable-item gnus-group-spam-exit-processor-ifile)
+           (variable-item gnus-group-spam-exit-processor-stat)
+           (variable-item gnus-group-spam-exit-processor-bogofilter)
+           (variable-item gnus-group-spam-exit-processor-blacklist)
+           (variable-item gnus-group-spam-exit-processor-report-gmane)
+           (variable-item gnus-group-spam-exit-processor-spamoracle)
+           (variable-item gnus-group-ham-exit-processor-bogofilter)
+           (variable-item gnus-group-ham-exit-processor-ifile)
+           (variable-item gnus-group-ham-exit-processor-stat)
+           (variable-item gnus-group-ham-exit-processor-whitelist)
+           (variable-item gnus-group-ham-exit-processor-BBDB)
+           (variable-item gnus-group-ham-exit-processor-copy)
+           (variable-item gnus-group-ham-exit-processor-spamoracle))))
    :function-document
-   "Which spam or ham processors will be applied to the GROUP articles at summary exit."
+   "Which spam or ham processors will be applied when the summary is exited."
    :variable gnus-spam-process-newsgroups
    :variable-default nil
    :variable-document
@@ -1950,29 +1952,37 @@ a backend on summary exit.  If non-nil, this should be a list of group
 name regexps that should match all groups in which to do automatic
 spam processing, associated with the appropriate processor."
    :variable-group spam
-   :variable-type '(repeat :tag "Spam/Ham Processors"
-                          (list :tag "Spam Summary Exit Processor Choices"
-                                (regexp :tag "Group Regexp")
-                                (set :tag "Spam/Ham Summary Exit Processor"
-                                     (variable-item gnus-group-spam-exit-processor-ifile)
-                                     (variable-item gnus-group-spam-exit-processor-stat)
-                                     (variable-item gnus-group-spam-exit-processor-bogofilter)
-                                     (variable-item gnus-group-spam-exit-processor-blacklist)
-                                     (variable-item gnus-group-spam-exit-processor-report-gmane)
-                                     (variable-item gnus-group-ham-exit-processor-bogofilter)
-                                     (variable-item gnus-group-ham-exit-processor-ifile)
-                                     (variable-item gnus-group-ham-exit-processor-stat)
-                                     (variable-item gnus-group-ham-exit-processor-whitelist)
-                                     (variable-item gnus-group-ham-exit-processor-BBDB)
-                                     (variable-item gnus-group-ham-exit-processor-copy))))
+   :variable-type 
+   '(repeat :tag "Spam/Ham Processors"
+           (list :tag "Spam Summary Exit Processor Choices"
+                 (regexp :tag "Group Regexp")
+                 (set 
+                  :tag "Spam/Ham Summary Exit Processor"
+                  (variable-item gnus-group-spam-exit-processor-ifile)
+                  (variable-item gnus-group-spam-exit-processor-stat)
+                  (variable-item gnus-group-spam-exit-processor-bogofilter)
+                  (variable-item gnus-group-spam-exit-processor-blacklist)
+                  (variable-item gnus-group-spam-exit-processor-spamoracle)
+                  (variable-item gnus-group-spam-exit-processor-report-gmane)
+                  (variable-item gnus-group-ham-exit-processor-bogofilter)
+                  (variable-item gnus-group-ham-exit-processor-ifile)
+                  (variable-item gnus-group-ham-exit-processor-stat)
+                  (variable-item gnus-group-ham-exit-processor-whitelist)
+                  (variable-item gnus-group-ham-exit-processor-BBDB)
+                  (variable-item gnus-group-ham-exit-processor-spamoracle)
+                  (variable-item gnus-group-ham-exit-processor-copy))))
    :parameter-document
-   "Which spam processors will be applied to the spam or ham GROUP articles at summary exit.")
+   "Which spam or ham processors will be applied when the summary is exited.")
 
   (gnus-define-group-parameter
    spam-process-destination
-   :parameter-type '(choice :tag "Destination for spam-processed articles at summary exit"
-                           (string :tag "Move to a group")
-                           (const :tag "Expire" nil))
+   :type list
+   :parameter-type 
+   '(choice :tag "Destination for spam-processed articles at summary exit"
+           (string :tag "Move to a group")
+           (repeat :tag "Move to multiple groups"
+                   (string :tag "Destination group"))
+           (const :tag "Expire" nil))
    :function-document
    "Where spam-processed articles will go at summary exit."
    :variable gnus-spam-process-destinations
@@ -1985,23 +1995,30 @@ to do spam-processed article moving, associated with the destination
 group or nil for explicit expiration.  This only makes sense for
 mail groups."
    :variable-group spam
-   :variable-type '(repeat
-                   :tag "Spam-processed articles destination"
-                   (list
-                    (regexp :tag "Group Regexp")
-                    (choice
-                     :tag "Destination for spam-processed articles at summary exit"
-                     (string :tag "Move to a group")
-                     (const :tag "Expire" nil))))
+   :variable-type 
+   '(repeat
+     :tag "Spam-processed articles destination"
+     (list
+      (regexp :tag "Group Regexp")
+      (choice
+       :tag "Destination for spam-processed articles at summary exit"
+       (string :tag "Move to a group")
+       (repeat :tag "Move to multiple groups"
+              (string :tag "Destination group"))
+       (const :tag "Expire" nil))))
    :parameter-document
    "Where spam-processed articles will go at summary exit.")
-
+  
   (gnus-define-group-parameter
    ham-process-destination
-   :parameter-type '(choice
-                    :tag "Destination for ham articles at summary exit from a spam group"
-                    (string :tag "Move to a group")
-                    (const :tag "Do nothing" nil))
+   :type list
+   :parameter-type 
+   '(choice
+     :tag "Destination for ham articles at summary exit from a spam group"
+     (string :tag "Move to a group")
+     (repeat :tag "Move to multiple groups"
+            (string :tag "Destination group"))
+     (const :tag "Do nothing" nil))
    :function-document
    "Where ham articles will go at summary exit from a spam group."
    :variable gnus-ham-process-destinations
@@ -2014,14 +2031,17 @@ to do ham article moving, associated with the destination
 group or nil for explicit ignoring.  This only makes sense for
 mail groups, and only works in spam groups."
    :variable-group spam
-   :variable-type '(repeat
-                   :tag "Ham articles destination"
-                   (list
-                    (regexp :tag "Group Regexp")
-                    (choice
-                     :tag "Destination for ham articles at summary exit from spam group"
-                     (string :tag "Move to a group")
-                     (const :tag "Expire" nil))))
+   :variable-type 
+   '(repeat
+     :tag "Ham articles destination"
+     (list
+      (regexp :tag "Group Regexp")
+      (choice
+       :tag "Destination for ham articles at summary exit from spam group"
+       (string :tag "Move to a group")
+       (repeat :tag "Move to multiple groups"
+              (string :tag "Destination group"))
+       (const :tag "Expire" nil))))
    :parameter-document
    "Where ham articles will go at summary exit from a spam group.")
 
@@ -3337,11 +3357,19 @@ server is native)."
       group
     (gnus-group-full-name group (gnus-find-method-for-group group))))
 
+(defun gnus-group-guess-full-name-from-command-method (group)
+  "Guess the full name from GROUP, even if the method is native."
+  (if (gnus-group-prefixed-p group)
+      group
+    (gnus-group-full-name group gnus-command-method)))
+
 (defun gnus-group-real-prefix (group)
   "Return the prefix of the current group name."
-  (if (string-match "^[^:]+:" group)
-      (substring group 0 (match-end 0))
-    ""))
+  (if (stringp group)
+      (if (string-match "^[^:]+:" group)
+         (substring group 0 (match-end 0))
+       "")
+    nil))
 
 (defun gnus-group-short-name (group)
   "Return the short group name."
@@ -3804,11 +3832,21 @@ Disallow invalid group names."
                                      (cons (or default "") 0)
                                      'gnus-group-history)))
        (let ((match (match-string 0 group)))
-         (unless (y-or-n-p
-                  (format
-                   "Name \"%s\" contain forbidden \"%s\" (see "
-                   "gnus-invalid-group-regexp).  Proceed? "
-                   group match))
+         ;; `/' may be okay (e.g. for nnimap), so ask the user:
+         (unless (and (string-match "/" match)
+                      (message-y-or-n-p
+                       "Proceed and create group anyway? " t
+"The group name \"" group "\" contains a forbidden character: \"" match "\".
+
+Usually, it's dangerous to create a group with this name, because it's not
+supported by all back ends and servers.  On some IMAP servers, it's valid to
+use the character \"/\".
+
+If you are really sure, you can proceed anyway and create the group.
+
+You may customize the variable `gnus-invalid-group-regexp', which currently is
+set to \"" gnus-invalid-group-regexp
+"\", if you want to get rid of this query."))
            (setq prefix (format "Invalid group name: \"%s\".  " group)
                  group nil)))))
     group))