From: keiichi Date: Mon, 9 Aug 1999 05:07:39 +0000 (+0000) Subject: (gnus-ofsetup-read-pop-account): Fix bug. X-Git-Tag: nana-gnus-6_13_4b4-~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=9ac1f3a29adc9a7bbfa1f8b3444a49ca3d275a30;p=elisp%2Fgnus.git- (gnus-ofsetup-read-pop-account): Fix bug. (gnus-setup-for-offline): Generate nnmail-pop-password-required's value. --- diff --git a/lisp/gnus-ofsetup.el b/lisp/gnus-ofsetup.el index d150650..dc8fe05 100644 --- a/lisp/gnus-ofsetup.el +++ b/lisp/gnus-ofsetup.el @@ -61,7 +61,7 @@ (let ((auth (gnus-ofsetup-completing-read-symbol "Authentification Method" 'pass 'apop))) - (list (concat server "@" account) :auth-scheme auth))))) + (list (concat account "@" server) :auth-scheme auth))))) (defun gnus-setup-for-offline () "*Set up Gnus for offline environment." @@ -152,8 +152,15 @@ (while (setq spool (gnus-ofsetup-read-pop-account server)) (setq spool-file (cons spool spool-file))))) - (setq save-passwd - (y-or-n-p "Do you save password information to newsrc file? ")) + (while (not save-passwd) + (setq save-passwd + (gnus-ofsetup-completing-read-symbol + "How long do you save password" + 'never 'exit-emacs 'permanence)) + (if (and (eq save-passwd 'permanence) + (not (y-or-n-p + "Your password will be saved to newsrc file. OK? "))) + (setq save-passwd nil))) ;; Write to setting file. (save-excursion @@ -235,10 +242,17 @@ (prin1-to-string movemail-program-apop-option) ")\n")) (insert "(setq gnus-offline-mail-source '" (prin1-to-string spool-file) ")\n") - (when save-passwd - (insert "(add-hook 'gnus-setup-news-hook - (lambda () - (add-to-list 'gnus-variable-list 'nnmail-internal-password-cache)))\n")) + (insert + (cond + ((eq save-passwd 'never) + "(setq nnmail-pop-password-required nil)\n") + ((eq save-passwd 'exit-emacs) + "(setq nnmail-pop-password-required t)\n") + ((eq save-passwd 'permanence) + "(setq nnmail-pop-password-required t) +(add-hook 'gnus-setup-news-hook + (lambda () + (add-to-list 'gnus-variable-list 'nnmail-internal-password-cache)))\n"))) (write-region (point-min) (point-max) gnus-offline-setting-file)) (kill-buffer "* Setting"))) (load gnus-offline-setting-file))