* many files: Remove trailing whitespaces, replace spc+tab with
[gnus] / lisp / mm-url.el
index f76b8db..3e140ec 100644 (file)
@@ -54,7 +54,7 @@
     (lynx "lynx" "-source")
     (curl "curl")))
 
-(defcustom mm-url-program 
+(defcustom mm-url-program
   (cond
    ((executable-find "wget") 'wget)
    ((executable-find "w3m") 'w3m)
@@ -62,7 +62,7 @@
    ((executable-find "curl") 'curl)
    (t "GET"))
   "The url grab program."
-  :type '(choice 
+  :type '(choice
          (symbol :tag "wget" wget)
          (symbol :tag "w3m" w3m)
          (symbol :tag "lynx" lynx)
@@ -253,10 +253,12 @@ This is taken from RFC 2396.")
 
 (defun mm-url-load-url ()
   "Load `url-insert-file-contents'."
-  (condition-case ()
-      (require 'url-handlers)
-    (error nil))
-  (require 'url))
+  (unless (condition-case ()
+             (require 'url-handlers)
+           (error nil))
+    ;; w3-4.0pre0.46 or earlier version.
+    (require 'w3-vars)
+    (require 'url)))
 
 (defun mm-url-insert-file-contents (url)
   (if mm-url-use-external