mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-967
This commit is contained in:
parent
b17f53abc2
commit
870356897e
13 changed files with 326 additions and 53 deletions
|
|
@ -1177,18 +1177,18 @@ password is remembered in the buffer."
|
|||
(if passwd (setq imap-password passwd))
|
||||
(if imap-auth
|
||||
(and (funcall (nth 2 (assq imap-auth
|
||||
imap-authenticator-alist)) buffer)
|
||||
imap-authenticator-alist)) (current-buffer))
|
||||
(setq imap-state 'auth))
|
||||
;; Choose authenticator.
|
||||
(let ((auths imap-authenticators)
|
||||
auth)
|
||||
(while (setq auth (pop auths))
|
||||
;; OK to use authenticator?
|
||||
(when (funcall (nth 1 (assq auth imap-authenticator-alist)) buffer)
|
||||
(when (funcall (nth 1 (assq auth imap-authenticator-alist)) (current-buffer))
|
||||
(message "imap: Authenticating to `%s' using `%s'..."
|
||||
imap-server auth)
|
||||
(setq imap-auth auth)
|
||||
(if (funcall (nth 2 (assq auth imap-authenticator-alist)) buffer)
|
||||
(if (funcall (nth 2 (assq auth imap-authenticator-alist)) (current-buffer))
|
||||
(progn
|
||||
(message "imap: Authenticating to `%s' using `%s'...done"
|
||||
imap-server auth)
|
||||
|
|
|
|||
|
|
@ -35,10 +35,22 @@
|
|||
;;; .netrc and .authinfo rc parsing
|
||||
;;;
|
||||
|
||||
;; use encrypt if loaded (encrypt-file-alist has to be set as well)
|
||||
(eval-and-compile
|
||||
(autoload 'encrypt-find-model "encrypt")
|
||||
(autoload 'encrypt-insert-file-contents "encrypt"))
|
||||
(defalias 'netrc-point-at-eol
|
||||
(if (fboundp 'point-at-eol)
|
||||
'point-at-eol
|
||||
'line-end-position))
|
||||
(eval-when-compile
|
||||
(defvar encrypt-file-alist)
|
||||
;; This is unnecessary in the compiled version as it is a macro.
|
||||
(if (fboundp 'bound-and-true-p)
|
||||
(defalias 'netrc-bound-and-true-p 'bound-and-true-p)
|
||||
(defmacro netrc-bound-and-true-p (var)
|
||||
"Return the value of symbol VAR if it is bound, else nil."
|
||||
`(and (boundp (quote ,var)) ,var))))
|
||||
|
||||
(defgroup netrc nil
|
||||
"Netrc configuration."
|
||||
|
|
@ -55,8 +67,12 @@
|
|||
(let ((tokens '("machine" "default" "login"
|
||||
"password" "account" "macdef" "force"
|
||||
"port"))
|
||||
(encryption-model (when (netrc-bound-and-true-p encrypt-file-alist)
|
||||
(encrypt-find-model file)))
|
||||
alist elem result pair)
|
||||
(insert-file-contents file)
|
||||
(if encryption-model
|
||||
(encrypt-insert-file-contents file encryption-model)
|
||||
(insert-file-contents file))
|
||||
(goto-char (point-min))
|
||||
;; Go through the file, line by line.
|
||||
(while (not (eobp))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue