;;; url-vars.el --- Variables for Uniform Resource Locator tool
-;; Copyright (C) 1996-1999, 2001, 2004-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2001, 2004-2014 Free Software Foundation,
+;; Inc.
;; Keywords: comm, data, processes, hypermedia
;;; Code:
-(require 'mm-util)
-
(defconst url-version "Emacs"
"Version number of URL package.")
(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
(mapc 'make-variable-buffer-local
'(
url-current-object
- url-current-referer
url-current-mime-headers
))
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
(".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")
(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
- "*String to send in the Accept-encoding: field in HTTP requests.")
+(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)
+(declare-function mm-coding-system-p "mm-util" (cs))
;; Perhaps the first few should actually be given decreasing `q's and
;; the list should be trimmed significantly.
(defun url-mime-charset-string ()
"Generate a list of preferred MIME charsets for HTTP requests.
Generated according to current coding system priorities."
+ (require 'mm-util)
(if (fboundp 'sort-coding-systems)
(let ((ordered (sort-coding-systems
(let (accum)
";q=0.5"))))
(defvar url-mime-charset-string nil
- "*String to send in the Accept-charset: field in HTTP requests.
+ "String to send in the Accept-charset: field in HTTP requests.
The MIME charset corresponding to the most preferred coding system is
given priority 1 and the rest are given priority 0.5.")
:type '(choice (const :tag "None" :value nil) string)
:group 'url)
+;; From RFC3986: Scheme names consist of a sequence of characters
+;; beginning with a letter and followed by any combination of letters,
+;; digits, plus ("+"), period ("."), or hyphen ("-").
+
(defvar url-nonrelative-link
- "\\`\\([-a-zA-Z0-9+.]+:\\)"
+ "\\`\\([a-zA-Z][-a-zA-Z0-9+.]*:\\)"
"A regular expression that will match an absolute URL.")
(defcustom url-max-redirections 30
(defvar url-parse-syntax-table
(copy-syntax-table emacs-lisp-mode-syntax-table)
- "*A syntax table for parsing URLs.")
+ "A syntax table for parsing URLs.")
(modify-syntax-entry ?' "\"" url-parse-syntax-table)
(modify-syntax-entry ?` "\"" url-parse-syntax-table)
(modify-syntax-entry ?> ")<" url-parse-syntax-table)
(modify-syntax-entry ?/ " " url-parse-syntax-table)
-(defvar url-load-hook nil
- "*Hooks to be run after initializing the URL library.")
+(defcustom url-load-hook nil
+ "Hook run after initializing the URL library."
+ :group 'url
+ :type 'hook)
;;; Make OS/2 happy - yeeks
;; (defvar tcp-binary-process-input-services nil