;; Commit by Ichikawa-san by way of yamaoka.
authoryamaoka <yamaoka>
Mon, 1 Feb 1999 11:02:11 +0000 (11:02 +0000)
committeryamaoka <yamaoka>
Mon, 1 Feb 1999 11:02:11 +0000 (11:02 +0000)
* (gnus-offline-gnus-get-new-news): Undo my change.
(gnus-offline-define-menu-on-miee): Close parentheses.
(gnus-offline-define-menu-on-agent): Ditto.

lisp/gnus-offline.el

index 630af57..87764ea 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-offline.el --- To process mail & news at offline environment.
-;;; $Id: gnus-offline.el,v 1.1.4.7 1999-02-01 06:45:20 ichikawa Exp $
+;;; $Id: gnus-offline.el,v 1.1.4.8 1999-02-01 11:02:11 yamaoka Exp $
 
 ;;; Copyright (C) 1998 Tatsuya Ichikawa
 ;;;                    Yukihiro Ito
@@ -384,30 +384,26 @@ If value is nil , dialup line is disconnected status.")
   (if (functionp gnus-offline-dialup-function)
       (funcall gnus-offline-dialup-function))
   (gnus-offline-get-new-news-function)
-  (if (not (locate-library "mail-source"))
-      (progn
-       (let (buffer)
-         (unwind-protect
-             (progn
-               (save-excursion
-                 (or pop3-fma-password
-                     (when gnus-offline-pop-password-file
-                       (setq pop3-fma-save-password-information t)
-                       (setq buffer (get-buffer-create "*offline-temp*"))
-                       (set-buffer buffer)
-                       (erase-buffer)
-                       (insert-file-contents-as-binary gnus-offline-pop-password-file)
-                       (and gnus-offline-pop-password-decoding-function
-                            (funcall gnus-offline-pop-password-decoding-function))
-                       (eval-buffer))))
-               (gnus-group-get-new-news arg))
-           (when gnus-offline-pop-password-file
-             (setq pop3-fma-password nil)
-             (setq pop3-fma-save-password-information nil)
-             (kill-buffer buffer)))))
-    ;;
-    ;; Use mail-source.el
-    (gnus-group-get-new-news arg)))
+  (if (null gnus-offline-pop-password-file)
+      (gnus-group-get-new-news arg)
+    (let ((buffer (get-buffer-create "*offline-temp*")))
+      (unwind-protect
+         (progn
+           (if (boundp 'pop3-fma-password)
+               (setq pop3-fma-save-password-information t))
+           (save-excursion
+             (set-buffer buffer)
+             (erase-buffer)
+             (insert-file-contents-as-binary gnus-offline-pop-password-file)
+             (and gnus-offline-pop-password-decoding-function
+                  (funcall gnus-offline-pop-password-decoding-function))
+             (eval-buffer))
+           (gnus-group-get-new-news arg))
+       (if (boundp 'pop3-fma-password)
+           (setq pop3-fma-password nil
+                 pop3-fma-save-password-information nil)
+         (setq mail-source-password-cache nil))
+       (kill-buffer buffer)))))
 
 ;;
 ;; dialup...
@@ -544,7 +540,7 @@ If value is nil , dialup line is disconnected status.")
 (defun gnus-offline-enable-fetch-mail ()
   "*Set to fetch mail."
   (setq gnus-offline-mail-fetch-method 'nnmail)
-  (if (not (locate-library "mail-source"))
+  (if (not (featurep 'running-pterodactyl-gnus-0_73-or-later))
       (progn
        (setq nnmail-movemail-program 'pop3-fma-movemail)
        (setq nnmail-spool-file (append
@@ -797,7 +793,7 @@ If value is nil , dialup line is disconnected status.")
   (add-hook 'gnus-group-mode-hook
            '(lambda ()
               (local-set-key "\C-coh" 'gnus-offline-set-unplugged-state)
-              (if (not (locate-library "mail-source"))
+              (if (not (featurep 'running-pterodactyl-gnus-0_73-or-later))
                   (local-set-key "\C-com" 'gnus-offline-toggle-movemail-program))
               (local-set-key "\C-cof" 'gnus-offline-toggle-articles-to-fetch)
               (local-set-key "\C-coo" 'gnus-offline-toggle-on/off-send-mail)
@@ -850,7 +846,7 @@ If value is nil , dialup line is disconnected status.")
         "----"
         ("Gnus Offline"
          ["movemail \e$B$N@ZBX$(\e(B" gnus-offline-toggle-movemail-program
-          (not (locate-library "mail-source"))]
+          (not (featurep 'running-pterodactyl-gnus-0_73-or-later))]
          ["\e$B<hF@5-;v<oN`$NJQ99\e(B" gnus-offline-toggle-articles-to-fetch t]
          ["Mail \e$BAw?.J}K!\e(B(On/Off)\e$B$N@ZBX$(\e(B" gnus-offline-toggle-on/off-send-mail t]
          ["\e$B<+F0@ZCG$N@ZBX$(\e(B" gnus-offline-toggle-auto-hangup t]
@@ -872,7 +868,7 @@ If value is nil , dialup line is disconnected status.")
        "----"
        ("Gnus Offline"
        ["Toggle movemail program" gnus-offline-toggle-movemail-program
-        (not (locate-library "mail-source"))]
+        (not (featurep 'running-pterodactyl-gnus-0_73-or-later))]
        ["Toggle articles to fetch" gnus-offline-toggle-articles-to-fetch t]
        ["Toggle online/offline send mail" gnus-offline-toggle-on/off-send-mail t]
        ["Toggle auto hangup" gnus-offline-toggle-auto-hangup t]
@@ -896,7 +892,7 @@ If value is nil , dialup line is disconnected status.")
    (if (featurep 'meadow)
        '("Offline"
         ["movemail \e$B$N@ZBX$(\e(B" gnus-offline-toggle-movemail-program
-         (not (locate-library "mail-source"))]
+         (not (featurep 'running-pterodactyl-gnus-0_73-or-later))]
         ["\e$B<hF@5-;v<oN`$NJQ99\e(B" gnus-offline-toggle-articles-to-fetch t]
         ["Mail \e$BAw?.J}K!\e(B(On/Off)\e$B$N@ZBX$(\e(B" gnus-offline-toggle-on/off-send-mail t]
         ["\e$B<+F0@ZCG$N@ZBX$(\e(B" gnus-offline-toggle-auto-hangup t]
@@ -907,7 +903,7 @@ If value is nil , dialup line is disconnected status.")
         ["\e$B2s@~$N@ZCG\e(B" gnus-offline-set-unplugged-state gnus-offline-connected])
      '("Offline"
        ["Toggle movemail program" gnus-offline-toggle-movemail-program
-       (not (locate-library "mail-source"))]
+       (not (featurep 'running-pterodactyl-gnus-0_73-or-later))]
        ["Toggle articles to fetch" gnus-offline-toggle-articles-to-fetch t]
        ["Toggle online/offline send mail" gnus-offline-toggle-on/off-send-mail t]
        ["Toggle auto hangup" gnus-offline-toggle-auto-hangup t]