]> code.delx.au - gnu-emacs/blobdiff - lisp/url/url-vars.el
Switch to recommended form of GPLv3 permissions notice.
[gnu-emacs] / lisp / url / url-vars.el
index 705eb9470016b94f13f4ffeb12b960471ae8334a..be312b00388e32c4459fc1b5608bcc5895703594 100644 (file)
@@ -1,16 +1,16 @@
 ;;; url-vars.el --- Variables for Uniform Resource Locator tool
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004,
-;;   2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; 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
-;; the Free Software Foundation; either version 2, 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
@@ -18,9 +18,7 @@
 ;; GNU General Public License for more details.
 
 ;; 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/>.
 
 ;;; Code:
 
 (defvar url-current-mime-headers nil
   "A parsed representation of the MIME headers for the current url.")
 
-(mapcar 'make-variable-buffer-local
-       '(
-         url-current-object
-         url-current-referer
-         url-current-mime-headers
-         ))
+(mapc 'make-variable-buffer-local
+      '(
+       url-current-object
+       url-current-referer
+       url-current-mime-headers
+       ))
 
 (defcustom url-honor-refresh-requests t
   "*Whether to do automatic page reloads.
@@ -320,6 +318,12 @@ undefined."
   "\\`\\([-a-zA-Z0-9+.]+:\\)"
   "A regular expression that will match an absolute URL.")
 
+(defcustom url-max-redirections 30
+  "*The maximum number of redirection requests to honor in a HTTP connection.
+A negative number means to honor an unlimited number of redirection requests."
+  :type 'integer
+  :group 'url)
+
 (defcustom url-confirmation-func 'y-or-n-p
   "*What function to use for asking yes or no functions.
 Possible values are `yes-or-no-p' or `y-or-n-p', or any function that
@@ -379,7 +383,7 @@ Currently supported methods:
 (modify-syntax-entry ?/ " " url-parse-syntax-table)
 
 (defvar url-load-hook nil
-  "*Hooks to be run after initalizing the URL library.")
+  "*Hooks to be run after initializing the URL library.")
 
 ;;; Make OS/2 happy - yeeks
 ;; (defvar     tcp-binary-process-input-services nil
@@ -392,12 +396,7 @@ Currently supported methods:
 This should be set, e.g. by mail user agents rendering HTML to avoid
 `bugs' which call home.")
 
-(defun url-vars-unload-hook ()
-  (remove-hook 'set-language-environment-hook 'url-set-mime-charset-string))
-
-(add-hook 'url-vars-unload-hook 'url-vars-unload-hook)
-
 (provide 'url-vars)
 
-;;; arch-tag: 29205e5f-c5ce-433c-8d5d-38cbaed64b49
+;; arch-tag: 29205e5f-c5ce-433c-8d5d-38cbaed64b49
 ;;; url-vars.el ends here