+2003-03-04 Jesper Harder <harder@ifa.au.dk>
+
+ * mail-source.el (mail-source-read-passwd): Remove. `read-passwd'
+ exists in all supported Emacs versions, so we don't need this
+ compatibility function.
+ (mail-source-fetch-pop, mail-source-check-pop)
+ (mail-source-fetch-webmail): Use read-passwd.
+
+ * nntp.el (nntp-send-authinfo, nntp-send-nosy-authinfo)
+ (nntp-open-telnet, nntp-open-via-telnet-and-telnet): Use
+ read-passwd.
+
+ * nnwarchive.el (nnwarchive-open-server): Use read-passwd.
+
+ * imap.el (imap-read-passwd): Remove.
+ (imap-interactive-login): Use read-passwd.
+
+ * canlock.el (canlock-read-passwd): Remove.
+ (canlock-insert-header, canlock-verify): Use read-passwd.
+
+ * sieve-manage.el (sieve-manage-read-passwd): Remove.
+ (sieve-manage-interactive-login): Use read-passwd.
+
+ * pop3.el (pop3-read-passwd): Remove.
+ (pop3-movemail, pop3-get-message-count, pop3-apop): Use
+ read-passwd.
+
+ * pgg.el (pgg-read-passphrase): Simplify.
+
+2003-03-03 Kevin Greiner <kgreiner@xpediantsolutions.com>
+
+ * gnus-agent.el (gnus-agent-mode): Fixed the mode line reports
+ 'plugged' when actually 'unplugged' bug.
+ (gnus-category-read): Ignore nil values when converting an
+ old-format category so that the new-format category will default
+ those attributes to the global variables.
+
2003-03-03 Reiner Steib <Reiner.Steib@gmx.de>
* mail-source.el (mail-source-delete-old-incoming-confirm): Fixed
"Make a SHA-1 digest of MESSAGE as a unibyte string of length 20 bytes."
(canlock-string-as-unibyte (funcall canlock-sha1-function message)))
-(defvar canlock-read-passwd nil)
-(defun canlock-read-passwd (prompt &rest args)
- "Read a password using PROMPT.
-If ARGS, PROMPT is used as an argument to `format'."
- (let ((prompt
- (if args
- (apply 'format prompt args)
- prompt)))
- (unless canlock-read-passwd
- (if (or (fboundp 'read-passwd) (load "passwd" t))
- (setq canlock-read-passwd 'read-passwd)
- (unless (fboundp 'ange-ftp-read-passwd)
- (autoload 'ange-ftp-read-passwd "ange-ftp"))
- (setq canlock-read-passwd 'ange-ftp-read-passwd)))
- (funcall canlock-read-passwd prompt)))
-
(defun canlock-make-cancel-key (message-id password)
"Make a Cancel-Key header."
(when (> (length password) 20)
(message "There are no Message-ID(s)")
(unless password
(setq password (or canlock-password
- (canlock-read-passwd
+ (read-passwd
"Password for Canlock: "))))
(if (or (not (stringp password)) (zerop (length password)))
(message "Password for Canlock is bad")
(error "%s" errmsg))
(setq password (or canlock-password-for-verify
- (canlock-read-passwd "Password for Canlock: ")))
+ (read-passwd "Password for Canlock: ")))
(if (or (not (stringp password)) (zerop (length password)))
(progn
(setq errmsg "Password for Canlock is bad")
buffer))))
minor-mode-map-alist))
(when (eq major-mode 'gnus-group-mode)
- (gnus-agent-toggle-plugged gnus-plugged))
+ (let ((init-plugged gnus-plugged))
+ ;; g-a-t-p does nothing when gnus-plugged isn't changed.
+ ;; Therefore, make certain that the current value does not
+ ;; match the desired initial value.
+ (setq gnus-plugged :unknown)
+ (gnus-agent-toggle-plugged init-plugged)))
(gnus-run-hooks 'gnus-agent-mode-hook
(intern (format "gnus-agent-%s-mode-hook" buffer)))))
(mapcar
(lambda (c)
(setcdr c
- (mapcar*
- (lambda (valu symb)
- (cons symb valu))
- (cdr c)
- '(agent-predicate agent-score-file agent-groups)))
+ (delq nil
+ (mapcar*
+ (lambda (valu symb)
+ (if valu
+ (cons symb valu)))
+ (cdr c)
+ '(agent-predicate agent-score-file agent-groups))))
c)
old-list)))))
(list (gnus-agent-cat-make 'default)))))
(setcdr alist (imap-remassoc key (cdr alist)))
alist)))
-(defun imap-read-passwd (prompt &rest args)
- "Read a password using PROMPT.
-If ARGS, PROMPT is used as an argument to `format'."
- (let ((prompt (if args
- (apply 'format prompt args)
- prompt)))
- (funcall (if (or (fboundp 'read-passwd)
- (and (load "subr" t)
- (fboundp 'read-passwd))
- (and (load "passwd" t)
- (fboundp 'read-passwd)))
- 'read-passwd
- (autoload 'ange-ftp-read-passwd "ange-ftp")
- 'ange-ftp-read-passwd)
- prompt)))
-
(defsubst imap-utf7-encode (string)
(if imap-use-utf7
(and string
"'): ")
(or user imap-default-user))))
(setq passwd (or imap-password
- (imap-read-passwd
+ (read-passwd
(concat "IMAP password for " user "@"
imap-server " (using authenticator `"
(symbol-name imap-auth) "'): "))))
(buffer-disable-undo (get-buffer-create imap-debug-buffer))
(mapcar (lambda (f) (trace-function-background f imap-debug-buffer))
'(
- imap-read-passwd
imap-utf7-encode
imap-utf7-decode
imap-error-text
(not (zerop (nth 7 (file-attributes from))))
(delete-file from)))
-(defvar mail-source-read-passwd nil)
-(defun mail-source-read-passwd (prompt &rest args)
- "Read a password using PROMPT.
-If ARGS, PROMPT is used as an argument to `format'."
- (let ((prompt
- (if args
- (apply 'format prompt args)
- prompt)))
- (unless mail-source-read-passwd
- (if (or (fboundp 'read-passwd) (load "passwd" t))
- (setq mail-source-read-passwd 'read-passwd)
- (unless (fboundp 'ange-ftp-read-passwd)
- (autoload 'ange-ftp-read-passwd "ange-ftp"))
- (setq mail-source-read-passwd 'ange-ftp-read-passwd)))
- (funcall mail-source-read-passwd prompt)))
-
(defun mail-source-fetch-with-program (program)
(zerop (call-process shell-file-name nil nil nil
shell-command-switch program)))
(setq password
(or password
(cdr (assoc from mail-source-password-cache))
- (mail-source-read-passwd
+ (read-passwd
(format "Password for %s at %s: " user server)))))
(when server
(setenv "MAILHOST" server))
(setq password
(or password
(cdr (assoc from mail-source-password-cache))
- (mail-source-read-passwd
+ (read-passwd
(format "Password for %s at %s: " user server))))
(unless (assoc from mail-source-password-cache)
(push (cons from password) mail-source-password-cache)))
(or password
(cdr (assoc (format "webmail:%s:%s" subtype user)
mail-source-password-cache))
- (mail-source-read-passwd
+ (read-passwd
(format "Password for %s at %s: " user subtype))))
(when (and password
(not (assoc (format "webmail:%s:%s" subtype user)
port number on server. The program should accept IMAP commands on
stdin and return responses to stdout.")
-(eval-and-compile
- (autoload 'mail-source-read-passwd "mail-source"))
-
\f
;;; Internal functions.
(or passwd
nntp-authinfo-password
(setq nntp-authinfo-password
- (mail-source-read-passwd
- (format "NNTP (%s@%s) password: "
- user nntp-address))))))))))
+ (read-passwd (format "NNTP (%s@%s) password: "
+ user nntp-address))))))))))
(defun nntp-send-nosy-authinfo ()
"Send the AUTHINFO to the nntp server."
(nntp-send-command "^3.*\r?\n" "AUTHINFO USER" user)
(when t ;???Should check if AUTHINFO succeeded
(nntp-send-command "^2.*\r?\n" "AUTHINFO PASS"
- (mail-source-read-passwd "NNTP (%s@%s) password: "
- user nntp-address))))))
+ (read-passwd (format "NNTP (%s@%s) password: "
+ user nntp-address)))))))
(defun nntp-send-authinfo-from-file ()
"Send the AUTHINFO to the nntp server.
proc (concat
(or nntp-telnet-passwd
(setq nntp-telnet-passwd
- (mail-source-read-passwd "Password: ")))
+ (read-passwd "Password: ")))
"\n"))
(nntp-wait-for-string nntp-telnet-shell-prompt)
(process-send-string
(concat
(or nntp-via-user-password
(setq nntp-via-user-password
- (mail-source-read-passwd
- "Password: ")))
+ (read-passwd "Password: ")))
"\n"))
(nntp-wait-for-string nntp-via-shell-prompt)
(let ((real-telnet-command `("exec"
(require 'gnus-bcklg)
(require 'nnmail)
(require 'mm-util)
-(require 'mail-source)
(require 'mm-url)
(nnoo-declare nnwarchive)
user-mail-address)))
(setq nnwarchive-passwd
(or nnwarchive-passwd
- (mail-source-read-passwd
+ (read-passwd
(format "Password for %s at %s: "
nnwarchive-login server)))))
(unless nnwarchive-groups
;; query for password
(if (and pop3-password-required (not pop3-password))
(setq pop3-password
- (pop3-read-passwd (format "Password for %s: " pop3-maildrop))))
+ (read-passwd (format "Password for %s: " pop3-maildrop))))
(cond ((equal 'apop pop3-authentication-scheme)
(pop3-apop process pop3-maildrop))
((equal 'pass pop3-authentication-scheme)
;; query for password
(if (and pop3-password-required (not pop3-password))
(setq pop3-password
- (pop3-read-passwd (format "Password for %s: " pop3-maildrop))))
+ (read-passwd (format "Password for %s: " pop3-maildrop))))
(cond ((equal 'apop pop3-authentication-scheme)
(pop3-apop process pop3-maildrop))
((equal 'pass pop3-authentication-scheme)
t)
)))))
-(defvar pop3-read-passwd nil)
-(defun pop3-read-passwd (prompt)
- (if (not pop3-read-passwd)
- (if (fboundp '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))
-
(defun pop3-clean-region (start end)
(setq end (set-marker (make-marker) end))
(save-excursion
(let ((pass pop3-password))
(if (and pop3-password-required (not pass))
(setq pass
- (pop3-read-passwd (format "Password for %s: " pop3-maildrop))))
+ (read-passwd (format "Password for %s: " pop3-maildrop))))
(if pass
(let ((hash (pop3-md5 (concat pop3-timestamp pass))))
(pop3-send-command process (format "APOP %s %s" user hash))
(when (fboundp 'set-buffer-multibyte)
(set-buffer-multibyte nil)))
-(defun sieve-manage-read-passwd (prompt &rest args)
- "Read a password using PROMPT.
-If ARGS, PROMPT is used as an argument to `format'."
- (let ((prompt (if args
- (apply 'format prompt args)
- prompt)))
- (funcall (if (or (fboundp 'read-passwd)
- (and (load "subr" t)
- (fboundp 'read-passwd))
- (and (load "passwd" t)
- (fboundp 'read-passwd)))
- 'read-passwd
- (autoload 'ange-ftp-read-passwd "ange-ftp")
- 'ange-ftp-read-passwd)
- prompt)))
-
-
;; Uses the dynamically bound `reason' variable.
(defvar reason)
(defun sieve-manage-interactive-login (buffer loginfunc)
sieve-manage-server ": ")
(or user sieve-manage-default-user))))
(setq passwd (or sieve-manage-password
- (sieve-manage-read-passwd
+ (read-passwd
(concat "Managesieve password for " user "@"
sieve-manage-server ": "))))
(when (and user passwd)