*** /home/piater/share/emacs/lisp/smtpmail-e22.1.el 2008-02-13 10:29:28.911165917 +0100 --- /home/piater/share/emacs/lisp/smtpmail.el 2008-02-13 09:46:37.914414498 +0100 *************** *** 78,83 **** --- 78,84 ---- (autoload 'netrc-parse "netrc") (autoload 'netrc-machine "netrc") (autoload 'netrc-get "netrc") + (autoload 'password-read "password") ; for new emacsen: "password-cache" ;;; (defgroup smtpmail nil *************** *** 546,557 **** (netrc-get hostentry "password")))) (smtpmail-find-credentials smtpmail-auth-credentials host port))) (passwd (when cred (or (smtpmail-cred-passwd cred) ! (read-passwd ! (format "SMTP password for %s:%s: " ! (smtpmail-cred-server cred) ! (smtpmail-cred-port cred)))))) ret) (when (and cred mech) (cond --- 547,558 ---- (netrc-get hostentry "password")))) (smtpmail-find-credentials smtpmail-auth-credentials host port))) + (prompt (when cred (format "SMTP password for %s:%s: " + (smtpmail-cred-server cred) + (smtpmail-cred-port cred)))) (passwd (when cred (or (smtpmail-cred-passwd cred) ! (password-read prompt prompt)))) ret) (when (and cred mech) (cond *************** *** 621,629 **** (t (error "Mechanism %s not implemented" mech))) ;; Remember the password. ! (when (and (not (stringp smtpmail-auth-credentials)) ! (null (smtpmail-cred-passwd cred))) ! (setcar (cdr (cdr (cdr cred))) passwd))))) (defun smtpmail-via-smtp (recipient smtpmail-text-buffer) (let ((process nil) --- 622,629 ---- (t (error "Mechanism %s not implemented" mech))) ;; Remember the password. ! (when (null (smtpmail-cred-passwd cred)) ! (password-cache-add prompt passwd))))) (defun smtpmail-via-smtp (recipient smtpmail-text-buffer) (let ((process nil)