changeset 58900:96433f173a6e

Don't `require' everything eagerly.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 11 Dec 2004 22:06:00 +0000
parents 9715276c90ce
children 40bfa1ceae4a
files lisp/url/ChangeLog lisp/url/url-handlers.el
diffstat 2 files changed, 26 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/url/ChangeLog	Sat Dec 11 22:01:42 2004 +0000
+++ b/lisp/url/ChangeLog	Sat Dec 11 22:06:00 2004 +0000
@@ -1,3 +1,7 @@
+2004-12-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* url-handlers.el: Don't `require' everything eagerly.
+
 2004-11-30  Paul Pogonyshev  <pogonyshev@gmx.net>
 
 	* url-http.el (url-http-handle-cookies): Bind `url-current-object'
@@ -18,8 +22,7 @@
 
 2004-11-12  Masatake YAMATO  <jet@gyve.org>
 
-	* url-mailto.el (url-mailto): Fix a typo in the 
-	comment.
+	* url-mailto.el (url-mailto): Fix a typo in the comment.
 
 2004-11-02  Masatake YAMATO  <jet@gyve.org>
 
@@ -76,12 +79,12 @@
 
 	* url-vars.el (url-passwd-entry-func): Var deleted.
 	(mm-mime-mule-charset-alist): Remove compatibility code for old Gnus.
-	(url-weekday-alist): Renamed from weekday-alist.
-	(url-monthabbrev-alist): Renamed from monthabbrev-alist.
+	(url-weekday-alist): Rename from weekday-alist.
+	(url-monthabbrev-alist): Rename from monthabbrev-alist.
 	(url-vars-unload-hook): Initialize hook var to hold the function.
 
-	* url-util.el (url-get-normalized-date): Use
-	url-weekday-alist and url-monthabbrev-alist.
+	* url-util.el (url-get-normalized-date): Use url-weekday-alist and
+	url-monthabbrev-alist.
 
 	* url-misc.el: Load cl at compile time.
 
@@ -99,8 +102,8 @@
 	* url-news.el (url-snews): Use nntp-open-tls-stream if
 	url-gateway-method is tls.
 
-	* url-ldap.el (url-ldap-certificate-formatter): Use
-	tls-certificate-information if ssl.el is not available.
+	* url-ldap.el (url-ldap-certificate-formatter):
+	Use tls-certificate-information if ssl.el is not available.
 
 	* url-https.el (url-https-create-secure-wrapper): Use tls if ssl
 	is not available.
--- a/lisp/url/url-handlers.el	Sat Dec 11 22:01:42 2004 +0000
+++ b/lisp/url/url-handlers.el	Sat Dec 11 22:06:00 2004 +0000
@@ -25,11 +25,21 @@
 
 ;;; Code:
 
-(require 'url)
-(require 'url-parse)
-(require 'url-util)
-(require 'mm-decode)
-(require 'mailcap)
+;; (require 'url)
+(eval-when-compile (require 'url-parse))
+;; (require 'url-util)
+(eval-when-compile (require 'mm-decode))
+;; (require 'mailcap)
+;; The following functions in the byte compiler's warnings are known not
+;; to cause any real problem for the following reasons:
+;; - mm-save-part-to-file, mm-destroy-parts: always used
+;;   after mm-dissect-buffer and defined in the same file.
+;; The following are autoloaded instead of `require'd to avoid eagerly
+;; loading all of URL when turning on url-handler-mode in the .emacs.
+(autoload 'url-retrieve-synchronously "url" "Retrieve url synchronously.")
+(autoload 'url-expand-file-name "url-expand" "Convert url to a fully specified url, and canonicalize it.")
+(autoload 'mm-dissect-buffer "mm-decode" "Dissect the current buffer and return a list of MIME handles.")
+(autoload 'url-scheme-get-property "url-methods" "Get property of a URL SCHEME.")
 
 (eval-when-compile
   (require 'cl))