cd /usr/share/emacs/contrib/gnus-5.8.2/lisp/ diff -c /usr/share/emacs/contrib/gnus-5.8.2/lisp/old-mail-source.el /usr/share/emacs/contrib/gnus-5.8.2/lisp/mail-source.el *** /usr/share/emacs/contrib/gnus-5.8.2/lisp/old-mail-source.el Wed Dec 15 21:41:17 1999 --- /usr/share/emacs/contrib/gnus-5.8.2/lisp/mail-source.el Thu Dec 16 13:22:01 1999 *************** *** 351,356 **** --- 351,393 ---- (not (zerop (nth 7 (file-attributes from)))) (delete-file from))) + ;;; Password support + + (defcustom mail-authinfo-file "~/.authinfo" + ".netrc-like file that holds nntp authinfo passwords. + Usually the same file as nntp-authinfo-file." + :type + '(choice file + (repeat :tag "Entries" + :menu-tag "Inline" + (list :format "%v" + :value ("" ("login" . "") ("password" . "")) + (string :tag "Host") + (checklist :inline t + (cons :format "%v" + (const :format "" "login") + (string :format "Login: %v")) + (cons :format "%v" + (const :format "" "password") + (string :format "Password: %v"))))))) + + (defun tehom-gnus-set-mail-password (server) + "" + + (let* + ( + (all-machines + (gnus-parse-netrc mail-authinfo-file)) + + (the-machine + (gnus-netrc-machine all-machines server)) + + (password + (gnus-netrc-get the-machine "password"))) + + password)) + + (defvar mail-source-read-passwd nil) (defun mail-source-read-passwd (prompt &rest args) "Read a password using PROMPT. *************** *** 420,426 **** found))) (defun mail-source-fetch-pop (source callback) ! "Fetcher for single-file sources." (mail-source-bind (pop source) (mail-source-run-script prescript --- 457,463 ---- found))) (defun mail-source-fetch-pop (source callback) ! "Fetcher for POP sources." (mail-source-bind (pop source) (mail-source-run-script prescript *************** *** 433,441 **** (when (eq authentication 'password) (setq password (or password ! (cdr (assoc from mail-source-password-cache)) ! (mail-source-read-passwd ! (format "Password for %s at %s: " user server))))) (when server (setenv "MAILHOST" server)) (setq result --- 470,479 ---- (when (eq authentication 'password) (setq password (or password ! (cdr (assoc from mail-source-password-cache)) ! (tehom-gnus-set-mail-password server) ! (mail-source-read-passwd ! (format "Password for %s at %s: " user server))))) (when server (setenv "MAILHOST" server)) (setq result Diff finished at Thu Dec 16 14:01:12