+(defun pop3-string-to-list (string &optional regexp)
+ "Chop up a string into a list."
+ (let ((list)
+ (regexp (or regexp " "))
+ (string (if (string-match "\r" string)
+ (substring string 0 (match-beginning 0))
+ string)))
+ (store-match-data nil)
+ (while string
+ (if (string-match regexp string)
+ (setq list (cons (substring string 0 (- (match-end 0) 1)) list)
+ string (substring string (match-end 0)))
+ (setq list (cons string list)
+ string nil)))
+ (nreverse list)))
+
+(defvar pop3-read-passwd nil)
+(defun pop3-read-passwd (prompt)
+ (if (not pop3-read-passwd)
+ (if (functionp 'read-passwd)
+ (setq pop3-read-passwd 'read-passwd)
+ (if (load "passwd" t)
+ (setq pop3-read-passwd 'read-passwd)
+ (autoload 'ange-ftp-read-passwd "ange-ftp")
+ (setq pop3-read-passwd 'ange-ftp-read-passwd))))
+ (funcall pop3-read-passwd prompt))
+