HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add 2012 to FSF copyright years for Emacs files
[bpt/emacs.git]
/
lisp
/
url
/
url-methods.el
diff --git
a/lisp/url/url-methods.el
b/lisp/url/url-methods.el
index
94dcd49
..
b611983
100644
(file)
--- a/
lisp/url/url-methods.el
+++ b/
lisp/url/url-methods.el
@@
-1,26
+1,23
@@
;;; url-methods.el --- Load URL schemes as needed
;;; url-methods.el --- Load URL schemes as needed
-;; Copyright (C) 1996, 1997, 1998, 1999, 2004,
-;; 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2012 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
;; This file is part of GNU Emacs.
;; Keywords: comm, data, processes, hypermedia
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software
;
you can redistribute it and/or modify
+;; 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
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation
; either version 3, or (at your option)
-;; any later version.
-;;
+;; the Free Software Foundation
, either version 3 of the License, or
+;;
(at your option)
any later version.
+
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
-;;
+
;; You should have received a copy of the GNU General Public License
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Commentary:
@@
-65,7
+62,9
@@
(defun url-scheme-default-loader (url &optional callback cbargs)
"Signal an error for an unknown URL scheme."
(defun url-scheme-default-loader (url &optional callback cbargs)
"Signal an error for an unknown URL scheme."
- (error "Unkown URL scheme: %s" (url-type url)))
+ (error "Unknown 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'."
(defun url-scheme-register-proxy (scheme)
"Automatically find a proxy for SCHEME and put it in `url-proxy-services'."
@@
-73,7
+72,8
@@
(env-proxy (or (getenv (upcase env-var))
(getenv (downcase env-var))))
(cur-proxy (assoc scheme url-proxy-services))
(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)
;; If env-proxy is an empty string, treat it as if it were nil
(when (and (stringp env-proxy)
@@
-112,7
+112,7
@@
(message "Using a proxy for %s..." scheme)))))
(defun url-scheme-get-property (scheme property)
(message "Using a proxy for %s..." scheme)))))
(defun url-scheme-get-property (scheme property)
- "Get
property
of a URL SCHEME.
+ "Get
PROPERTY
of a URL SCHEME.
Will automatically try to load a backend from url-SCHEME.el if
it has not already been loaded."
(setq scheme (downcase scheme))
Will automatically try to load a backend from url-SCHEME.el if
it has not already been loaded."
(setq scheme (downcase scheme))
@@
-126,7
+126,8
@@
it has not already been loaded."
(if (fboundp loader)
(progn
;; Found the module to handle <scheme> URLs
(if (fboundp loader)
(progn
;; Found the module to handle <scheme> 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)
(setq desc (list 'name scheme
'loader loader))
(dolist (cell url-scheme-methods)
@@
-152,5
+153,4
@@
it has not already been loaded."
(provide 'url-methods)
(provide 'url-methods)
-;; arch-tag: 336863f8-5a07-4906-9be5-b3c6bcebbe67
;;; url-methods.el ends here
;;; url-methods.el ends here