X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/d1ce47b068062c1d6373e5add5abfbab0114ccb3..412f24b9ddf1e07022f8c5fe05f0717f130c4c02:/lisp/url/url-methods.el diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el index 57b9db602e..3b86ed4556 100644 --- a/lisp/url/url-methods.el +++ b/lisp/url/url-methods.el @@ -1,7 +1,6 @@ ;;; url-methods.el --- Load URL schemes as needed -;; Copyright (C) 1996, 1997, 1998, 1999, 2004, -;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 1996-1999, 2004-2011 Free Software Foundation, Inc. ;; Keywords: comm, data, processes, hypermedia @@ -65,13 +64,16 @@ "Signal an error for an unknown URL scheme." (error "Unkown URL scheme: %s" (url-type url))) +(defvar url-scheme--registering-proxy nil) + (defun url-scheme-register-proxy (scheme) "Automatically find a proxy for SCHEME and put it in `url-proxy-services'." (let* ((env-var (concat scheme "_proxy")) (env-proxy (or (getenv (upcase env-var)) (getenv (downcase env-var)))) (cur-proxy (assoc scheme url-proxy-services)) - (urlobj nil)) + (urlobj nil) + (url-scheme--registering-proxy t)) ;; If env-proxy is an empty string, treat it as if it were nil (when (and (stringp env-proxy) @@ -124,7 +126,8 @@ it has not already been loaded." (if (fboundp loader) (progn ;; Found the module to handle URLs - (url-scheme-register-proxy scheme) + (unless url-scheme--registering-proxy + (url-scheme-register-proxy scheme)) (setq desc (list 'name scheme 'loader loader)) (dolist (cell url-scheme-methods) @@ -150,5 +153,4 @@ it has not already been loaded." (provide 'url-methods) -;; arch-tag: 336863f8-5a07-4906-9be5-b3c6bcebbe67 ;;; url-methods.el ends here