Mercurial > hg > xemacs-beta
diff lisp/gnus/nnmail.el @ 28:1917ad0d78d7 r19-15b97
Import from CVS: tag r19-15b97
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:51:55 +0200 |
parents | 441bb1e64a06 |
children | ec9a17fef872 |
line wrap: on
line diff
--- a/lisp/gnus/nnmail.el Mon Aug 13 08:51:34 2007 +0200 +++ b/lisp/gnus/nnmail.el Mon Aug 13 08:51:55 2007 +0200 @@ -532,7 +532,7 @@ (delete-file nnmail-crash-box)) (let ((inbox (file-truename (expand-file-name inbox))) (tofile (file-truename (expand-file-name nnmail-crash-box))) - movemail popmail errors) + movemail popmail errors result) (if (setq popmail (string-match "^po:" (file-name-nondirectory inbox))) (setq inbox (file-name-nondirectory inbox)) @@ -582,16 +582,18 @@ (let ((default-directory "/")) (if (nnheader-functionp nnmail-movemail-program) (funcall nnmail-movemail-program inbox tofile) - (apply - 'call-process - (append - (list - (expand-file-name - nnmail-movemail-program exec-directory) - nil errors nil inbox tofile) - (when nnmail-internal-password - (list nnmail-internal-password)))))) - (if (not (buffer-modified-p errors)) + (setq result + (apply + 'call-process + (append + (list + (expand-file-name + nnmail-movemail-program exec-directory) + nil errors nil inbox tofile) + (when nnmail-internal-password + (list nnmail-internal-password))))))) + (if (and (not (buffer-modified-p errors)) + (zerop result)) ;; No output => movemail won (progn (unless popmail @@ -617,8 +619,8 @@ (when (looking-at "movemail: ") (delete-region (point-min) (match-end 0))) (unless (yes-or-no-p - (format "movemail: %s. Continue? " - (buffer-string))) + (format "movemail: %s (%d return). Continue? " + (buffer-string) result)) (error "%s" (buffer-string))) (setq tofile nil))))))) (message "Getting mail from %s...done" inbox) @@ -1573,7 +1575,8 @@ (unless nnmail-read-passwd (if (load "passwd" t) (setq nnmail-read-passwd 'read-passwd) - (autoload 'ange-ftp-read-passwd "ange-ftp") + (unless (fboundp 'ange-ftp-read-passwd) + (autoload 'ange-ftp-read-passwd "ange-ftp")) (setq nnmail-read-passwd 'ange-ftp-read-passwd))) (funcall nnmail-read-passwd prompt)))