comparison lisp/gnus/imap.el @ 41516:52c9115c94be

(imap-interactive-login, imap-open, imap-authenticate): Use make-local-variable rather than make-variable-buffer-local.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 25 Nov 2001 22:19:45 +0000
parents c545df001cd2
children 7308bbc423d5
comparison
equal deleted inserted replaced
41515:1df0e35d264c 41516:52c9115c94be
717 "Login to server in BUFFER. 717 "Login to server in BUFFER.
718 LOGINFUNC is passed a username and a password, it should return t if 718 LOGINFUNC is passed a username and a password, it should return t if
719 it where sucessful authenticating itself to the server, nil otherwise. 719 it where sucessful authenticating itself to the server, nil otherwise.
720 Returns t if login was successful, nil otherwise." 720 Returns t if login was successful, nil otherwise."
721 (with-current-buffer buffer 721 (with-current-buffer buffer
722 (make-variable-buffer-local 'imap-username) 722 (make-local-variable 'imap-username)
723 (make-variable-buffer-local 'imap-password) 723 (make-local-variable 'imap-password)
724 (let (user passwd ret) 724 (let (user passwd ret)
725 ;; (condition-case () 725 ;; (condition-case ()
726 (while (or (not user) (not passwd)) 726 (while (or (not user) (not passwd))
727 (setq user (or imap-username 727 (setq user (or imap-username
728 (read-from-minibuffer 728 (read-from-minibuffer
885 necessery. If nil, the buffer name is generated." 885 necessery. If nil, the buffer name is generated."
886 (setq buffer (or buffer (format " *imap* %s:%d" server (or port 0)))) 886 (setq buffer (or buffer (format " *imap* %s:%d" server (or port 0))))
887 (with-current-buffer (get-buffer-create buffer) 887 (with-current-buffer (get-buffer-create buffer)
888 (if (imap-opened buffer) 888 (if (imap-opened buffer)
889 (imap-close buffer)) 889 (imap-close buffer))
890 (mapcar 'make-variable-buffer-local imap-local-variables) 890 (mapcar 'make-local-variable imap-local-variables)
891 (imap-disable-multibyte) 891 (imap-disable-multibyte)
892 (buffer-disable-undo) 892 (buffer-disable-undo)
893 (setq imap-server (or server imap-server)) 893 (setq imap-server (or server imap-server))
894 (setq imap-port (or port imap-port)) 894 (setq imap-port (or port imap-port))
895 (setq imap-auth (or auth imap-auth)) 895 (setq imap-auth (or auth imap-auth))
955 (with-current-buffer (or buffer (current-buffer)) 955 (with-current-buffer (or buffer (current-buffer))
956 (if (not (eq imap-state 'nonauth)) 956 (if (not (eq imap-state 'nonauth))
957 (or (eq imap-state 'auth) 957 (or (eq imap-state 'auth)
958 (eq imap-state 'select) 958 (eq imap-state 'select)
959 (eq imap-state 'examine)) 959 (eq imap-state 'examine))
960 (make-variable-buffer-local 'imap-username) 960 (make-local-variable 'imap-username)
961 (make-variable-buffer-local 'imap-password) 961 (make-local-variable 'imap-password)
962 (if user (setq imap-username user)) 962 (if user (setq imap-username user))
963 (if passwd (setq imap-password passwd)) 963 (if passwd (setq imap-password passwd))
964 (if (funcall (nth 2 (assq imap-auth imap-authenticator-alist)) buffer) 964 (if (funcall (nth 2 (assq imap-auth imap-authenticator-alist)) buffer)
965 (setq imap-state 'auth))))) 965 (setq imap-state 'auth)))))
966 966