Synch with `t-gnus-6_14' and Gnus.
[elisp/gnus.git-] / lisp / gnus-ofsetup.el
index 29946bf..a10a275 100644 (file)
@@ -1,36 +1,40 @@
 ;;; gnus-ofsetup.el --- Setup advisor for Offline reading for Mail/News.
-;;;
-;;; Copyright (C) 1998 Tatsuya Ichikawa
-;;; Author: Tatsuya Ichikawa <t-ichi@po.shiojiri.ne.jp>
-;;;      Tsukamoto Tetsuo <czkmt@remus.dti.ne.jp>
-;;;
-;;; This file is part of Semi-gnus.
-;;;
-;;; GNU Emacs is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 2, or (at your option)
-;;; any later version.
-
-;;; GNU Emacs is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;;; Boston, MA 02111-1307, USA.
-;;;
-;;;; Commentary:
-;;; How to use.
-;;;
-;;;      M-x load[RET]gnus-ofsetup
-;;;      M-x gnus-setup-for-offline
-;;;
+
+;; Copyright (C) 1998 Tatsuya Ichikawa
+
+;; Author: Tatsuya Ichikawa <t-ichi@po.shiojiri.ne.jp>
+;;     Tsukamoto Tetsuo <czkmt@remus.dti.ne.jp>
+;;
+;; This file is part of Semi-gnus.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+;;
+
+;;; Commentary:
+
+;; How to use.
+;;
+;;      M-x load[RET]gnus-ofsetup
+;;      M-x gnus-setup-for-offline
+;;
 
 ;;; Code:
 
 (eval-when-compile (require 'cl))
+(eval-when-compile (require 'gnus-clfns))
 
 (require 'read-passwd)
 
     (setup-9 . "News spool directory for sending: ")
     (setup-10 . "Mail spool directory for sending: ")
     (setup-11 . "How many mail sources will get mails from? : ")
-    (setup-12 . "Mail Account name : ")
-    (setup-13 . "Mail server : ")
-    (setup-14 . "Authentification Method ")
-    (setup-15 . "Do you use pop3.el to fetch mail? ")
-    (setup-16 . "movemail program name: ")
-    (setup-17 . "movemail options: ")
-    (setup-18 . "Do you save password information to newsrc file? ")
-    (setup-19 . "What type of the mail source? ")
+    (setup-12 . "What type of the mail source? ")
+    (setup-13 . "Mail Account name : ")
+    (setup-14 . "Mail server : ")
+    (setup-15 . "Authentification Method ")
+    (setup-16 . "Do you use pop3.el to fetch mail? ")
+    (setup-17 . "movemail program name: ")
+    (setup-18 . "movemail options: ")
+    (setup-19 . "What network stream? ")
     (setup-20 . "File: ")
     (setup-21 . "Directory: ")
-    (setup-22 . "What network stream? ")
+    (setup-22 . "Do you save password information to newsrc file? ")
 
     (param-news-method-1 . "News Method")
     (param-news-method-2 . "Gnus Agent")
@@ -283,17 +287,17 @@ restarted.")
     (setup-9 . "\e$B%K%e!<%9$N%9%W!<%k%G%#%l%/%H%j\e(B: ")
     (setup-10 . "\e$B%a!<%k$N%9%W!<%k%G%#%l%/%H%j\e(B: ")
     (setup-11 . "\e$B@_Dj$9$k%a!<%k<hF@@h$N?t$O\e(B? (\e$B8e$GDI2C$G$-$^$9\e(B): ")
-    (setup-12 . "\e$B%a!<%k$N%"%+%&%s%HL>\e(B: ")
-    (setup-13 . "\e$B$=$N%"%+%&%s%H$N$"$k%a!<%k%5!<%PL>\e(B: ")
-    (setup-14 . "\e$BG'>ZJ}<0$O\e(B? ")
-    (setup-15 . "\e$B%a!<%k$N<u?.$K$O\e(B pop3.el \e$B$r;H$$$^$9$+\e(B? ")
-    (setup-16 . "movemail \e$B%W%m%0%i%`$NL>A0\e(B: ")
-    (setup-17 . "movemail \e$B%W%m%0%i%`$KEO$90z?t\e(B: ")
-    (setup-18 . "newsrc \e$B%U%!%$%k$K\e(B POP \e$B%Q%9%o!<%I$rJ]B8$7$^$9$+\e(B? ")
-    (setup-19 . "\e$B%a!<%k<hF@@h$N%?%$%W$O\e(B? ")
+    (setup-12 . "\e$B%a!<%k<hF@@h$N%?%$%W$O\e(B? ")
+    (setup-13 . "\e$B%a!<%k$N%"%+%&%s%HL>\e(B: ")
+    (setup-14 . "\e$B$=$N%"%+%&%s%H$N$"$k%a!<%k%5!<%PL>\e(B: ")
+    (setup-15 . "\e$BG'>ZJ}<0$O\e(B? ")
+    (setup-16 . "\e$B%a!<%k$N<u?.$K$O\e(B pop3.el \e$B$r;H$$$^$9$+\e(B? ")
+    (setup-17 . "movemail \e$B%W%m%0%i%`$NL>A0\e(B: ")
+    (setup-18 . "movemail \e$B%W%m%0%i%`$KEO$90z?t\e(B: ")
+    (setup-19 . "\e$B@\B3J}<0$O\e(B? ")
     (setup-20 . "\e$B%U%!%$%k\e(B: ")
     (setup-21 . "\e$B%G%#%l%/%H%j\e(B: ")
-    (setup-22 . "\e$B@\B3J}<0$O\e(B? ")
+    (setup-22 . "newsrc \e$B%U%!%$%k$K\e(B POP \e$B%Q%9%o!<%I$rJ]B8$7$^$9$+\e(B? ")
 
     (param-news-method-4 . "\
 \e$B%K%e!<%95-;v$r<hF@$9$kJ}K!$G$9!#\e(B")
@@ -473,7 +477,7 @@ mail source specifier \e$B$H$+>e5-$N$h$&$J%-!<%o!<%I$K$D$$$F$b$C$H$h$/\e(B
        (let* ((j (- n (1- i)))
               (type (gnus-ofsetup-completing-read-symbol
                      (format "<%d of %d> %s" j n
-                             (gnus-ofsetup-gettext 'setup-19))
+                             (gnus-ofsetup-gettext 'setup-12))
                      'pop 'imap 'file 'directory 'maildir))
               user server authentication stream islisp source
               prog args program path)
@@ -481,37 +485,38 @@ mail source specifier \e$B$H$+>e5-$N$h$&$J%-!<%o!<%I$K$D$$$F$b$C$H$h$/\e(B
          (when (or (string= type "pop") (string= type "imap"))
            (setq user (read-from-minibuffer
                        (format "<%d of %d> %s" j n
-                               (gnus-ofsetup-gettext 'setup-12))))
+                               (gnus-ofsetup-gettext 'setup-13))))
            (setq server (read-from-minibuffer
                          (format "<%d of %d> %s" j n
-                                 (gnus-ofsetup-gettext 'setup-13)))))
+                                 (gnus-ofsetup-gettext 'setup-14)))))
          (when (string= type "pop")
            (setq authentication (gnus-ofsetup-completing-read-symbol
                                  (format "<%d of %d> %s" j n
-                                         (gnus-ofsetup-gettext 'setup-14))
+                                         (gnus-ofsetup-gettext 'setup-15))
                                  'password 'apop))
            (setq islisp (y-or-n-p
                          (format "<%d of %d> %s" j n
-                                 (gnus-ofsetup-gettext 'setup-15))))
+                                 (gnus-ofsetup-gettext 'setup-16))))
            (unless islisp
              (setq prog (read-file-name
                          (format "<%d of %d> %s" j n
-                                 (gnus-ofsetup-gettext 'setup-16))
+                                 (gnus-ofsetup-gettext 'setup-17))
                          exec-directory "movemail"))
              (setq args (read-from-minibuffer
                          (format "<%d of %d> %s" j n
-                                 (gnus-ofsetup-gettext 'setup-17) "-pf")))
+                                 (gnus-ofsetup-gettext 'setup-18) "-pf")))
              (setq program (format "%s %s %s %s %s"
                                    prog args "po:%u" "%t" "%p"))))
          (when (string= type "imap")
            (setq stream (gnus-ofsetup-completing-read-symbol
                          (format "<%d of %d> %s" j n
-                                 (gnus-ofsetup-gettext 'setup-22))
-                         'kerberos4 'ssl 'network))
+                                 (gnus-ofsetup-gettext 'setup-19))
+                         'kerberos4 'starttls 'ssl 'network))
            (setq authentication (gnus-ofsetup-completing-read-symbol
                                  (format "<%d of %d> %s" j n
                                          (gnus-ofsetup-gettext 'setup-14))
-                                 'kerberos4 'cram-md5 'anonymous 'login)))
+                                 'kerberos4 'digest-md5 'cram-md5 'login
+                                 'anonymous)))
          (when (string= type "file")
            (setq path (read-file-name
                        (format "<%d of %d> %s" j n
@@ -535,7 +540,7 @@ mail source specifier \e$B$H$+>e5-$N$h$&$J%-!<%o!<%I$K$D$$$F$b$C$H$h$/\e(B
          (setq mail-source (nconc mail-source (list source))))
        (setq i (1- i)))
       (setq save-passwd
-           (y-or-n-p (gnus-ofsetup-gettext 'setup-18)))
+           (y-or-n-p (gnus-ofsetup-gettext 'setup-22)))
       ;;
       (gnus-ofsetup-prepare gnus-ofsetup-update-setting-file)))
   (load gnus-offline-setting-file))
@@ -757,4 +762,6 @@ mail source specifier \e$B$H$+>e5-$N$h$&$J%-!<%o!<%I$K$D$$$F$b$C$H$h$/\e(B
 (setq mail-source-read-passwd 'read-pw-read-passwd)
 (add-hook 'gnus-setup-news-hook 'read-pw-set-mail-source-passwd-cache)
 
-;; gnus-ofsetup.el Ends here.
+(provide 'gnus-ofsetup)
+
+;;; gnus-ofsetup.el ends here