Switch to recommended form of GPLv3 permissions notice.
[bpt/emacs.git] / lisp / url / url-vars.el
index 2451490..be312b0 100644 (file)
@@ -1,16 +1,16 @@
 ;;; url-vars.el --- Variables for Uniform Resource Locator tool
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004,
-;;   2005 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.
@@ -112,9 +110,8 @@ using `dired' to view the directory."
   :type 'string
   :group 'url-file)
 
-;; Fixme: this should have a setter which calls url-setup-privacy-info.
 (defcustom url-privacy-level '(email)
-  "*How private you want your requests to be.
+  "How private you want your requests to be.
 HTTP has header fields for various information about the user, including
 operating system information, email addresses, the last page you visited, etc.
 This variable controls how much of this information is sent.
@@ -144,6 +141,8 @@ Samples:
 This variable controls several other variables and is _NOT_ automatically
 updated.  Call the function `url-setup-privacy-info' after modifying this
 variable."
+  :initialize 'custom-initialize-default
+  :set (lambda (sym val) (set-default sym val) (url-setup-privacy-info))
   :type '(radio (const :tag "None (you believe in the basic goodness of humanity)"
                       :value none)
                (const :tag "Low (do not reveal last location)"
@@ -278,7 +277,7 @@ get the first available language (as opposed to the default)."
 (defvar url-package-version nil
   "Version number of package using URL.")
 
-(defvar url-package-name nil "Version number of package using URL.")
+(defvar url-package-name nil "Name of package using URL.")
 
 (defvar url-system-type nil
   "What type of system we are on.")
@@ -319,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
@@ -378,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
@@ -391,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