changeset 106954:b21e977d14e7

* net/tramp-imap.el (top): Autoload needed packages.
author Michael Albinus <michael.albinus@gmx.de>
date Fri, 22 Jan 2010 22:17:11 +0100
parents a1e356d208cd
children a0a8dc9e7a05
files lisp/ChangeLog lisp/net/tramp-imap.el
diffstat 2 files changed, 21 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Jan 22 11:43:54 2010 -0500
+++ b/lisp/ChangeLog	Fri Jan 22 22:17:11 2010 +0100
@@ -1,3 +1,7 @@
+2010-01-22  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp-imap.el (top): Autoload needed packages.
+
 2010-01-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* mail/rmailmm.el (rmail-mime-handle): Don't set the buffer to unibyte
--- a/lisp/net/tramp-imap.el	Fri Jan 22 11:43:54 2010 -0500
+++ b/lisp/net/tramp-imap.el	Fri Jan 22 22:17:11 2010 +0100
@@ -55,13 +55,24 @@
 (require 'assoc)
 (require 'tramp)
 (require 'tramp-compat)
-(require 'message)
-(require 'imap-hash)
-(require 'epa)
+(eval-when-compile (require 'imap-hash))
+
 (autoload 'auth-source-user-or-password "auth-source")
+(autoload 'epg-context-operation "epg")
+(autoload 'epg-context-set-armor "epg")
+(autoload 'epg-context-set-passphrase-callback "epg")
+(autoload 'epg-context-set-progress-callback "epg")
+(autoload 'epg-decrypt-string "epg")
+(autoload 'epg-encrypt-string "epg")
+(autoload 'imap-hash-get "imap-hash")
+(autoload 'imap-hash-make "imap-hash")
+(autoload 'imap-hash-map "imap-hash")
+(autoload 'imap-hash-put "imap-hash")
+(autoload 'imap-hash-rem "imap-hash")
 
 ;; We use the additional header "X-Size" for encoding the size of a file.
-(add-to-list 'imap-hash-headers 'X-Size 'append)
+(eval-after-load "imap-hash"
+  '(add-to-list 'imap-hash-headers 'X-Size 'append))
 
 ;; Define Tramp IMAP method ...
 (defconst tramp-imap-method "imap"
@@ -662,7 +673,8 @@
 		  (read-passwd
 		   (if (eq key-id 'PIN)
 		       "Tramp-IMAP passphrase for PIN: "
-		     (let ((entry (assoc key-id epg-user-id-alist)))
+		     (let ((entry (assoc key-id
+					 (symbol-value 'epg-user-id-alist))))
 		       (if entry
 			   (format "Tramp-IMAP passphrase for %s %s: "
 				   key-id (cdr entry))