Changes committed gnus/lisp (ChangeLog encrypt.el netrc.el)
"Ted Zlatanov" <[email protected]>
| Newsgroups | gmane.emacs.gnus.commits |
|---|---|
| Message-ID | <[email protected]> |
Modified: ChangeLog encrypt.el netrc.el * netrc.el: Autoload encrypt when encrypt-file-alist is set. (netrc-parse): Use encrypt-file-alist to determine if encrypt-find-model or encrypt-insert-file-contents should be used. * encrypt.el: Clarify documentation. Load password-cache or password, whichever one is found first, instead of autoloading. Index: ChangeLog diff -u gnus/lisp/ChangeLog:7.1713 gnus/lisp/ChangeLog:7.1714 --- ChangeLog:7.1713 Tue Dec 18 16:41:36 2007 +++ ChangeLog Tue Dec 18 21:29:33 2007 @@ -1,3 +1,12 @@ +2007-12-19 Teodor Zlatanov <[email protected]> + + * netrc.el: Autoload encrypt when encrypt-file-alist is set. + (netrc-parse): Use encrypt-file-alist to determine if + encrypt-find-model or encrypt-insert-file-contents should be used. + + * encrypt.el: Clarify documentation. Load password-cache or + password, whichever one is found first, instead of autoloading. + 2007-12-17 Katsumi Yamaoka <[email protected]> * gnus-art.el (gnus-article-browse-html-parts): Add message header and Index: encrypt.el diff -u gnus/lisp/encrypt.el:7.11 gnus/lisp/encrypt.el:7.12 --- encrypt.el:7.11 Thu Nov 1 16:01:11 2007 +++ encrypt.el Tue Dec 18 21:29:33 2007 @@ -29,11 +29,12 @@ ;;; particular aspect. ;;; Use in Gnus like this: +;;; (require 'encrypt) ;;; (setq ;;; nnimap-authinfo-file "~/.authinfo.enc" ;;; nntp-authinfo-file "~/.authinfo.enc" ;;; smtpmail-auth-credentials "~/.authinfo.enc" -;;; ;; using the AES256 cipher, feel free to use your own favorite +;;; ;; GnuPG using the AES256 cipher, feel free to use your own favorite ;;; encrypt-file-alist (quote (("~/.authinfo.enc" (gpg "AES256")))) ;;; password-cache-expiry 600) @@ -53,7 +54,9 @@ ;; autoload password (eval-and-compile - (autoload 'password-read "password")) + (if (locate-library "password-cache") + (require 'password-cache) + (require 'password))) (defgroup encrypt '((password-cache custom-variable) (password-cache-expiry custom-variable)) Index: netrc.el diff -u gnus/lisp/netrc.el:7.17 gnus/lisp/netrc.el:7.18 --- netrc.el:7.17 Sun Dec 9 01:04:21 2007 +++ netrc.el Tue Dec 18 21:29:33 2007 @@ -34,6 +34,10 @@ ;;; .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 @@ -54,8 +58,12 @@ (let ((tokens '("machine" "default" "login" "password" "account" "macdef" "force" "port")) + (encryption-model (when (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))