* pgg.el: Autoload url-insert-file-contents instead of loading w3/url.
authorSimon Josefsson <jas@extundo.com>
Mon, 8 Aug 2005 10:08:35 +0000 (10:08 +0000)
committerSimon Josefsson <jas@extundo.com>
Mon, 8 Aug 2005 10:08:35 +0000 (10:08 +0000)
(pgg-insert-url-with-w3): Don't load url here.

lisp/ChangeLog
lisp/pgg.el

index 57b9a05..3d80260 100644 (file)
@@ -1,3 +1,9 @@
+2005-08-08  Simon Josefsson  <jas@extundo.com>
+
+       * pgg.el: Autoload url-insert-file-contents instead of loading
+       w3/url.
+       (pgg-insert-url-with-w3): Don't load url here.
+
 2005-08-07  Jesper Harder  <harder@phys.au.dk>
 
        * message.el (message-kill-to-signature): Don't insert newline at
index 588665c..5ba4bc2 100644 (file)
 (require 'pgg-def)
 (require 'pgg-parse)
 (require 'password)
+(autoload 'url-insert-file-contents "url")
 
 ;; Don't merge these two `eval-when-compile's.
 (eval-when-compile
   (require 'cl))
-;; Fixme: This would be better done with an autoload for
-;; `url-insert-file-contents', and the url stuff rationalized.
-;; (`locate-library' can say whether the url code is available.)
-(eval-when-compile
-  (ignore-errors
-    (require 'w3)
-    (require 'url)))
 
 ;;; @ utility functions
 ;;;
@@ -328,7 +322,6 @@ within the region."
 
 (defun pgg-insert-url-with-w3 (url)
   (ignore-errors
-    (require 'url)
     (let (buffer-file-name)
       (url-insert-file-contents url))))