]> code.delx.au - gnu-emacs/blobdiff - lisp/url/url-vars.el
Update copyright year to 2016
[gnu-emacs] / lisp / url / url-vars.el
index 29f1e2cde0cd61b51ec3b138611343332b3c6efb..960a04ad30fe2547c000c1c6e521697690189ce3 100644 (file)
@@ -1,6 +1,7 @@
 ;;; url-vars.el --- Variables for Uniform Resource Locator tool
 
-;; Copyright (C) 1996-1999, 2001, 2004-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2001, 2004-2016 Free Software Foundation,
+;; Inc.
 
 ;; Keywords: comm, data, processes, hypermedia
 
@@ -27,6 +28,8 @@
 (defgroup url nil
   "Uniform Resource Locator tool."
   :version "22.1"
+  :link '(custom-manual "(url) Top")
+  :link '(info-link "(url) Customization")
   :group 'comm)
 
 (defgroup url-file nil
@@ -71,7 +74,7 @@ requests will be honored.  If t, all refresh requests will be honored.
 If non-nil and not t, the user will be asked for each refresh request."
   :type '(choice (const :tag "off" nil)
                 (const :tag "on" t)
-                (const :tag "ask" 'ask))
+                (other :tag "ask" ask))
   :group 'url-hairy)
 
 (defcustom url-automatic-caching nil
@@ -79,8 +82,8 @@ If non-nil and not t, the user will be asked for each refresh request."
   :type 'boolean
   :group 'url-cache)
 
-(defconst url-bug-address "bug-gnu-emacs@gnu.org"
-  "Where to send bug reports.")
+(define-obsolete-variable-alias 'url-bug-address
+  'report-emacs-bug-address "24.5")
 
 (defcustom url-personal-mail-address nil
   "Your full email address.
@@ -119,9 +122,9 @@ cookies  -- never accept HTTP cookies
 
 Samples:
 
- (setq url-privacy-level 'high)
- (setq url-privacy-level '(email lastloc))    ;; equivalent to 'high
- (setq url-privacy-level '(os))
+ (setq url-privacy-level \\='high)
+ (setq url-privacy-level \\='(email lastloc))    ;; equivalent to \\='high
+ (setq url-privacy-level \\='(os))
 
 ::NOTE::
 This variable controls several other variables and is _NOT_ automatically
@@ -152,7 +155,8 @@ variable."
                                    (".uue" . "x-uuencoded")
                                    (".hqx" . "x-hqx")
                                    (".Z"  . "x-compress")
-                                   (".bz2"  . "x-bzip2"))
+                                   (".bz2" . "x-bzip2")
+                                   (".xz" . "x-xz"))
   "An alist of file extensions and appropriate content-transfer-encodings."
   :type '(repeat (cons :format "%v"
                       (string :tag "Extension")
@@ -206,10 +210,14 @@ document."
   "A list of extra headers to send with the next request.
 Should be an assoc list of headers/contents.")
 
+(defvar url-request-noninteractive nil
+  "If non-nil, the request is done in a noninteractive context.")
+
 (defvar url-request-method nil "The method to use for the next request.")
 
-;; FIXME!!  (RFC 2616 gives examples like `compress, gzip'.)
-(defvar url-mime-encoding-string nil
+(defvar url-mime-encoding-string (and (fboundp 'zlib-available-p)
+                                     (zlib-available-p)
+                                     "gzip")
   "String to send in the Accept-encoding: field in HTTP requests.")
 
 (defvar mm-mime-mule-charset-alist)
@@ -349,6 +357,18 @@ Currently supported methods:
                (const :tag "Direct connection" :value native))
   :group 'url-hairy)
 
+(defcustom url-user-agent (format "User-Agent: %sURL/%s\r\n"
+                                 (if url-package-name
+                                     (concat url-package-name "/"
+                                             url-package-version " ")
+                                   "") url-version)
+  "User Agent used by the URL package for HTTP/HTTPS requests
+Should be a string or a function of no arguments returning a string."
+  :type '(choice (string :tag "A static User-Agent string")
+                 (function :tag "Call a function to get the User-Agent string"))
+  :version "25.1"
+  :group 'url)
+
 (defvar url-setup-done nil "Has setup configuration been done?")
 
 (defconst url-weekday-alist