changeset 74476:696cb74ae184

(url-proxy-object): New variable. (url-proxy): Bind it instead of `proxy-object'.
author Magnus Henoch <mange@freemail.hu>
date Fri, 08 Dec 2006 00:38:15 +0000
parents 519f20eefaee
children 90adadb81dba
files lisp/url/url-proxy.el
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/url/url-proxy.el	Fri Dec 08 00:22:04 2006 +0000
+++ b/lisp/url/url-proxy.el	Fri Dec 08 00:38:15 2006 +0000
@@ -65,12 +65,18 @@
       (url-warn 'url (format "Unknown proxy directive: %s" proxy) 'critical)
       nil))))
 
+(defvar url-proxy-object nil
+  "The URL to access through a proxy.
+This variable is bound by `url-proxy'.  If this is non-nil, the
+scheme-specific loader should use its argument as the proxy, and
+the value of this variable as the object to retrieve.")
+
 (defun url-proxy (url callback &optional cbargs)
   ;; Retrieve URL from a proxy.
   ;; Expects `url-using-proxy' to be bound to the specific proxy to use."
   (setq url-using-proxy (url-generic-parse-url url-using-proxy))
-  (let ((proxy-object (copy-sequence url)))
-    (url-set-target proxy-object nil)
+  (let ((url-proxy-object (copy-sequence url)))
+    (url-set-target url-proxy-object nil)
     (url-http url-using-proxy callback cbargs)))
 
 (provide 'url-proxy)