(top-level): Don't require cl when compiling.
[bpt/emacs.git] / lisp / url / url-methods.el
index f29364f..94dcd49 100644 (file)
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 ;;
 ;; GNU Emacs is distributed in the hope that it will be useful,
      ;; First check if its something like hostname:port
      ((string-match "^\\([^:]+\\):\\([0-9]+\\)$" env-proxy)
       (setq urlobj (url-generic-parse-url nil)) ; Get a blank object
-      (url-set-type urlobj "http")
-      (url-set-host urlobj (match-string 1 env-proxy))
-      (url-set-port urlobj (string-to-number (match-string 2 env-proxy))))
+      (setf (url-type urlobj) "http")
+      (setf (url-host urlobj) (match-string 1 env-proxy))
+      (setf (url-port urlobj) (string-to-number (match-string 2 env-proxy))))
      ;; Then check if its a fully specified URL
      ((string-match url-nonrelative-link env-proxy)
       (setq urlobj (url-generic-parse-url env-proxy))
-      (url-set-type urlobj "http")
-      (url-set-target urlobj nil))
+      (setf (url-type urlobj) "http")
+      (setf (url-target urlobj) nil))
      ;; Finally, fall back on the assumption that its just a hostname
      (t
       (setq urlobj (url-generic-parse-url nil)) ; Get a blank object
-      (url-set-type urlobj "http")
-      (url-set-host urlobj env-proxy)))
+      (setf (url-type urlobj) "http")
+      (setf (url-host urlobj) env-proxy)))
 
      (if (and (not cur-proxy) urlobj)
         (progn