annotate lisp/url/url-vars.el @ 112445:93fcbcb698b0

Improve configuration of makeinfo. * Makefile.in (MAKEINFO): Now controlled by `configure'. (MAKEINFO_OPTS): New variable. Use it where appropriate. (ENVADD): Updated.
author Werner Lemberg <wl@gnu.org>
date Sun, 23 Jan 2011 11:38:14 +0100
parents 61f7601898b1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
1 ;;; url-vars.el --- Variables for Uniform Resource Locator tool
57614
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
2
112284
61f7601898b1 Refill some copyright headers.
Glenn Morris <rgm@gnu.org>
parents: 112278
diff changeset
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, 2005, 2006, 2007,
61f7601898b1 Refill some copyright headers.
Glenn Morris <rgm@gnu.org>
parents: 112278
diff changeset
4 ;; 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
57614
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
5
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
6 ;; Keywords: comm, data, processes, hypermedia
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
7
57614
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
8 ;; This file is part of GNU Emacs.
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
9
94668
8259d0d8e107 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94429
diff changeset
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
57614
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
94668
8259d0d8e107 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94429
diff changeset
12 ;; the Free Software Foundation, either version 3 of the License, or
8259d0d8e107 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94429
diff changeset
13 ;; (at your option) any later version.
57614
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
14
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
18 ;; GNU General Public License for more details.
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
19
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
20 ;; You should have received a copy of the GNU General Public License
94668
8259d0d8e107 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94429
diff changeset
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
57614
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
22
5b9a33a95318 Update header.
Lars Hansen <larsh@soem.dk>
parents: 57514
diff changeset
23 ;;; Code:
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
24
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
25 (require 'mm-util)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
26
54770
e8824c4f5f7e Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-196
Miles Bader <miles@gnu.org>
parents: 54699
diff changeset
27 (defconst url-version "Emacs"
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
28 "Version number of URL package.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
29
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
30 (defgroup url nil
63993
ef9f3b48923d (url, url-file, url-cache, url-mime, url-hairy): Finish `defgroup' description
Juanma Barranquero <lekktu@gmail.com>
parents: 63619
diff changeset
31 "Uniform Resource Locator tool."
59996
aac0a33f5772 Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents: 57614
diff changeset
32 :version "22.1"
107379
3c0cd76e49ff Fix last change to use existing comm Custom group instead of `net'.
Chong Yidong <cyd@stupidchicken.com>
parents: 107378
diff changeset
33 :group 'comm)
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
34
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
35 (defgroup url-file nil
63993
ef9f3b48923d (url, url-file, url-cache, url-mime, url-hairy): Finish `defgroup' description
Juanma Barranquero <lekktu@gmail.com>
parents: 63619
diff changeset
36 "URL storage."
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
37 :prefix "url-"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
38 :group 'url)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
39
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
40 (defgroup url-cache nil
63993
ef9f3b48923d (url, url-file, url-cache, url-mime, url-hairy): Finish `defgroup' description
Juanma Barranquero <lekktu@gmail.com>
parents: 63619
diff changeset
41 "URL cache."
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
42 :prefix "url-"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
43 :prefix "url-cache-"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
44 :group 'url)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
45
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
46 (defgroup url-mime nil
63993
ef9f3b48923d (url, url-file, url-cache, url-mime, url-hairy): Finish `defgroup' description
Juanma Barranquero <lekktu@gmail.com>
parents: 63619
diff changeset
47 "MIME options of URL."
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
48 :prefix "url-"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
49 :group 'url)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
50
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
51 (defgroup url-hairy nil
63993
ef9f3b48923d (url, url-file, url-cache, url-mime, url-hairy): Finish `defgroup' description
Juanma Barranquero <lekktu@gmail.com>
parents: 63619
diff changeset
52 "Hairy options of URL."
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
53 :prefix "url-"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
54 :group 'url)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
55
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
56
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
57 (defvar url-current-object nil
96486
7369ded3b436 Typo and docstring fixes.
Juanma Barranquero <lekktu@gmail.com>
parents: 94668
diff changeset
58 "A parsed representation of the current URL.")
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
59
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
60 (defvar url-current-mime-headers nil
96486
7369ded3b436 Typo and docstring fixes.
Juanma Barranquero <lekktu@gmail.com>
parents: 94668
diff changeset
61 "A parsed representation of the MIME headers for the current URL.")
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
62
84930
41b075c0a949 (top): Use `mapc' rather than `mapcar'.
Juanma Barranquero <lekktu@gmail.com>
parents: 78222
diff changeset
63 (mapc 'make-variable-buffer-local
41b075c0a949 (top): Use `mapc' rather than `mapcar'.
Juanma Barranquero <lekktu@gmail.com>
parents: 78222
diff changeset
64 '(
41b075c0a949 (top): Use `mapc' rather than `mapcar'.
Juanma Barranquero <lekktu@gmail.com>
parents: 78222
diff changeset
65 url-current-object
41b075c0a949 (top): Use `mapc' rather than `mapcar'.
Juanma Barranquero <lekktu@gmail.com>
parents: 78222
diff changeset
66 url-current-referer
41b075c0a949 (top): Use `mapc' rather than `mapcar'.
Juanma Barranquero <lekktu@gmail.com>
parents: 78222
diff changeset
67 url-current-mime-headers
41b075c0a949 (top): Use `mapc' rather than `mapcar'.
Juanma Barranquero <lekktu@gmail.com>
parents: 78222
diff changeset
68 ))
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
69
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
70 (defcustom url-honor-refresh-requests t
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
71 "Whether to do automatic page reloads.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
72 These are done at the request of the document author or the server via
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
73 the `Refresh' header in an HTTP response. If nil, no refresh
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
74 requests will be honored. If t, all refresh requests will be honored.
96486
7369ded3b436 Typo and docstring fixes.
Juanma Barranquero <lekktu@gmail.com>
parents: 94668
diff changeset
75 If non-nil and not t, the user will be asked for each refresh request."
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
76 :type '(choice (const :tag "off" nil)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
77 (const :tag "on" t)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
78 (const :tag "ask" 'ask))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
79 :group 'url-hairy)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
80
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
81 (defcustom url-automatic-caching nil
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
82 "If non-nil, all documents will be automatically cached to the local disk."
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
83 :type 'boolean
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
84 :group 'url-cache)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
85
54804
2f011866477f (cl): Don't require.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 54770
diff changeset
86 (defconst url-bug-address "bug-gnu-emacs@gnu.org"
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
87 "Where to send bug reports.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
88
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
89 (defcustom url-personal-mail-address nil
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
90 "Your full email address.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
91 This is what is sent to HTTP servers as the FROM field in an HTTP
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
92 request."
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
93 :type '(choice (const :tag "Unspecified" nil) string)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
94 :group 'url)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
95
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
96 (defcustom url-directory-index-file "index.html"
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
97 "The filename to look for when indexing a directory.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
98 If this file exists, and is readable, then it will be viewed instead of
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
99 using `dired' to view the directory."
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
100 :type 'string
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
101 :group 'url-file)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
102
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
103 (defcustom url-privacy-level '(email)
68121
0c55f53b51e6 (url-privacy-level): Add setter.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65559
diff changeset
104 "How private you want your requests to be.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
105 HTTP has header fields for various information about the user, including
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
106 operating system information, email addresses, the last page you visited, etc.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
107 This variable controls how much of this information is sent.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
108
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
109 This should a symbol or a list.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
110 Valid values if a symbol are:
96486
7369ded3b436 Typo and docstring fixes.
Juanma Barranquero <lekktu@gmail.com>
parents: 94668
diff changeset
111 none -- send all information
7369ded3b436 Typo and docstring fixes.
Juanma Barranquero <lekktu@gmail.com>
parents: 94668
diff changeset
112 low -- don't send the last location
7369ded3b436 Typo and docstring fixes.
Juanma Barranquero <lekktu@gmail.com>
parents: 94668
diff changeset
113 high -- don't send the email address or last location
7369ded3b436 Typo and docstring fixes.
Juanma Barranquero <lekktu@gmail.com>
parents: 94668
diff changeset
114 paranoid -- don't send anything
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
115
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
116 If a list, this should be a list of symbols of what NOT to send.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
117 Valid symbols are:
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
118 email -- the email address
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
119 os -- the operating system info
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
120 lastloc -- the last location
96486
7369ded3b436 Typo and docstring fixes.
Juanma Barranquero <lekktu@gmail.com>
parents: 94668
diff changeset
121 agent -- do not send the User-Agent string
108999
ea40472a86d3 Close bug#6406.
Glenn Morris <rgm@gnu.org>
parents: 106815
diff changeset
122 cookies -- never accept HTTP cookies
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
123
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
124 Samples:
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
125
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
126 (setq url-privacy-level 'high)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
127 (setq url-privacy-level '(email lastloc)) ;; equivalent to 'high
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
128 (setq url-privacy-level '(os))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
129
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
130 ::NOTE::
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
131 This variable controls several other variables and is _NOT_ automatically
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
132 updated. Call the function `url-setup-privacy-info' after modifying this
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
133 variable."
68121
0c55f53b51e6 (url-privacy-level): Add setter.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65559
diff changeset
134 :initialize 'custom-initialize-default
0c55f53b51e6 (url-privacy-level): Add setter.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65559
diff changeset
135 :set (lambda (sym val) (set-default sym val) (url-setup-privacy-info))
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
136 :type '(radio (const :tag "None (you believe in the basic goodness of humanity)"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
137 :value none)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
138 (const :tag "Low (do not reveal last location)"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
139 :value low)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
140 (const :tag "High (no email address or last location)"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
141 :value high)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
142 (const :tag "Paranoid (reveal nothing!)"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
143 :value paranoid)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
144 (checklist :tag "Custom"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
145 (const :tag "Email address" :value email)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
146 (const :tag "Operating system" :value os)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
147 (const :tag "Last location" :value lastloc)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
148 (const :tag "Browser identification" :value agent)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
149 (const :tag "No cookies" :value cookie)))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
150 :group 'url)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
151
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
152 (defvar url-inhibit-uncompression nil "Do not do decompression if non-nil.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
153
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
154 (defcustom url-uncompressor-alist '((".z" . "x-gzip")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
155 (".gz" . "x-gzip")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
156 (".uue" . "x-uuencoded")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
157 (".hqx" . "x-hqx")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
158 (".Z" . "x-compress")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
159 (".bz2" . "x-bzip2"))
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
160 "An alist of file extensions and appropriate content-transfer-encodings."
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
161 :type '(repeat (cons :format "%v"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
162 (string :tag "Extension")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
163 (string :tag "Encoding")))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
164 :group 'url-mime)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
165
65559
02ea691fea58 (url-mail-command): Don't test fboundp of `compose-mail'.
Richard M. Stallman <rms@gnu.org>
parents: 64748
diff changeset
166 (defcustom url-mail-command 'compose-mail
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
167 "This function will be called whenever URL needs to send mail.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
168 It should enter a mail-mode-like buffer in the current window.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
169 The commands `mail-to' and `mail-subject' should still work in this
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
170 buffer, and it should use `mail-header-separator' if possible."
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
171 :type 'function
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
172 :group 'url)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
173
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
174 (defcustom url-proxy-services nil
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
175 "An alist of schemes and proxy servers that gateway them.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
176 Looks like ((\"http\" . \"hostname:portnumber\") ...). This is set up
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
177 from the ACCESS_proxy environment variables."
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
178 :type '(repeat (cons :format "%v"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
179 (string :tag "Protocol")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
180 (string :tag "Proxy")))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
181 :group 'url)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
182
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
183 (defcustom url-standalone-mode nil
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
184 "Rely solely on the cache?"
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
185 :type 'boolean
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
186 :group 'url-cache)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
187
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
188 (defvar url-mime-separator-chars (mapcar 'identity
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
189 (concat "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
190 "abcdefghijklmnopqrstuvwxyz"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
191 "0123456789'()+_,-./=?"))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
192 "Characters allowable in a MIME multipart separator.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
193
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
194 (defcustom url-bad-port-list
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
195 '("25" "119" "19")
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
196 "List of ports to warn the user about connecting to.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
197 Defaults to just the mail, chargen, and NNTP ports so you cannot be
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
198 tricked into sending fake mail or forging messages by a malicious HTML
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
199 document."
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
200 :type '(repeat (string :tag "Port"))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
201 :group 'url-hairy)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
202
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
203 (defvar url-mime-content-type-charset-regexp
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
204 ";[ \t]*charset=\"?\\([^\"]+\\)\"?"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
205 "Regexp used in parsing `Content-Type' for a charset indication.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
206
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
207 (defvar url-request-data nil "Any data to send with the next request.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
208
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
209 (defvar url-request-extra-headers nil
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
210 "A list of extra headers to send with the next request.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
211 Should be an assoc list of headers/contents.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
212
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
213 (defvar url-request-method nil "The method to use for the next request.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
214
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
215 ;; FIXME!! (RFC 2616 gives examples like `compress, gzip'.)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
216 (defvar url-mime-encoding-string nil
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
217 "*String to send in the Accept-encoding: field in HTTP requests.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
218
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
219 ;; Perhaps the first few should actually be given decreasing `q's and
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
220 ;; the list should be trimmed significantly.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
221 ;; Fixme: do something sane if we don't have `sort-coding-systems'
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
222 ;; (Emacs 20, XEmacs).
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
223 (defun url-mime-charset-string ()
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
224 "Generate a list of preferred MIME charsets for HTTP requests.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
225 Generated according to current coding system priorities."
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
226 (if (fboundp 'sort-coding-systems)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
227 (let ((ordered (sort-coding-systems
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
228 (let (accum)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
229 (dolist (elt mm-mime-mule-charset-alist)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
230 (if (mm-coding-system-p (car elt))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
231 (push (car elt) accum)))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
232 (nreverse accum)))))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
233 (concat (format "%s;q=1, " (pop ordered))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
234 (mapconcat 'symbol-name ordered ";q=0.5, ")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
235 ";q=0.5"))))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
236
110727
c6fdea2b097e url-vars.el (url-mime-charset-string): Changed the default to nil to
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents: 110420
diff changeset
237 (defvar url-mime-charset-string nil
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
238 "*String to send in the Accept-charset: field in HTTP requests.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
239 The MIME charset corresponding to the most preferred coding system is
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
240 given priority 1 and the rest are given priority 0.5.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
241
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
242 (defun url-set-mime-charset-string ()
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
243 (setq url-mime-charset-string (url-mime-charset-string)))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
244 ;; Regenerate if the language environment changes.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
245 (add-hook 'set-language-environment-hook 'url-set-mime-charset-string)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
246
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
247 ;; Fixme: set from the locale.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
248 (defcustom url-mime-language-string nil
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
249 "String to send in the Accept-language: field in HTTP requests.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
250
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
251 Specifies the preferred language when servers can serve documents in
96486
7369ded3b436 Typo and docstring fixes.
Juanma Barranquero <lekktu@gmail.com>
parents: 94668
diff changeset
252 several languages. Use RFC 1766 abbreviations, e.g.: `en' for
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
253 English, `de' for German. A comma-separated specifies descending
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
254 order of preference. The ordering can be made explicit using `q'
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
255 factors defined by HTTP, e.g. `de,en-gb;q=0.8,en;q=0.7'. `*' means
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
256 get the first available language (as opposed to the default)."
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
257 :type '(radio
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
258 (const :tag "None (get default language version)" :value nil)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
259 (const :tag "Any (get first available language version)" :value "*")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
260 (string :tag "Other"))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
261 :group 'url-mime
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
262 :group 'i18n)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
263
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
264 (defvar url-mime-accept-string nil
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
265 "String to send to the server in the Accept: field in HTTP requests.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
266
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
267 (defvar url-package-version nil
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
268 "Version number of package using URL.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
269
68121
0c55f53b51e6 (url-privacy-level): Add setter.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 65559
diff changeset
270 (defvar url-package-name nil "Name of package using URL.")
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
271
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
272 (defvar url-system-type nil
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
273 "What type of system we are on.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
274 (defvar url-os-type nil
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
275 "What OS we are on.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
276
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
277 (defcustom url-max-password-attempts 5
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
278 "Maximum number of times a password will be prompted for.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
279 Applies when a protected document is denied by the server."
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
280 :type 'integer
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
281 :group 'url)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
282
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
283 (defcustom url-temporary-directory (or (getenv "TMPDIR") "/tmp")
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
284 "Where temporary files go."
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
285 :type 'directory
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
286 :group 'url-file)
101886
60d716da7ee7 (url-temporary-directory): Mark as obsolete.
Chong Yidong <cyd@stupidchicken.com>
parents: 100908
diff changeset
287 (make-obsolete-variable 'url-temporary-directory
60d716da7ee7 (url-temporary-directory): Mark as obsolete.
Chong Yidong <cyd@stupidchicken.com>
parents: 100908
diff changeset
288 'temporary-file-directory "23.1")
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
289
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
290 (defcustom url-show-status t
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
291 "Whether to show a running total of bytes transferred.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
292 Can cause a large hit if using a remote X display over a slow link, or
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
293 a terminal with a slow modem."
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
294 :type 'boolean
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
295 :group 'url)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
296
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
297 (defvar url-using-proxy nil
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
298 "Either nil or the fully qualified proxy URL in use, e.g.
96486
7369ded3b436 Typo and docstring fixes.
Juanma Barranquero <lekktu@gmail.com>
parents: 94668
diff changeset
299 http://www.example.com/")
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
300
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
301 (defcustom url-news-server nil
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
302 "The default news server from which to get newsgroups/articles.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
303 Applies if no server is specified in the URL. Defaults to the
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
304 environment variable NNTPSERVER or \"news\" if NNTPSERVER is
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
305 undefined."
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
306 :type '(choice (const :tag "None" :value nil) string)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
307 :group 'url)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
308
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
309 (defvar url-nonrelative-link
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
310 "\\`\\([-a-zA-Z0-9+.]+:\\)"
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
311 "A regular expression that will match an absolute URL.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
312
77178
54ea4fb072b4 (url-max-redirections): New var.
Chong Yidong <cyd@stupidchicken.com>
parents: 75347
diff changeset
313 (defcustom url-max-redirections 30
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
314 "The maximum number of redirection requests to honor in a HTTP connection.
77178
54ea4fb072b4 (url-max-redirections): New var.
Chong Yidong <cyd@stupidchicken.com>
parents: 75347
diff changeset
315 A negative number means to honor an unlimited number of redirection requests."
54ea4fb072b4 (url-max-redirections): New var.
Chong Yidong <cyd@stupidchicken.com>
parents: 75347
diff changeset
316 :type 'integer
54ea4fb072b4 (url-max-redirections): New var.
Chong Yidong <cyd@stupidchicken.com>
parents: 75347
diff changeset
317 :group 'url)
54ea4fb072b4 (url-max-redirections): New var.
Chong Yidong <cyd@stupidchicken.com>
parents: 75347
diff changeset
318
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
319 (defcustom url-confirmation-func 'y-or-n-p
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
320 "What function to use for asking yes or no functions.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
321 Possible values are `yes-or-no-p' or `y-or-n-p', or any function that
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
322 takes a single argument (the prompt), and returns t only if a positive
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
323 answer is given."
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
324 :type '(choice (const :tag "Short (y or n)" :value y-or-n-p)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
325 (const :tag "Long (yes or no)" :value yes-or-no-p)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
326 (function :tag "Other"))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
327 :group 'url-hairy)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
328
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
329 (defcustom url-gateway-method 'native
110307
5495085c9b6c lisp/url tiny fixes.
Glenn Morris <rgm@gnu.org>
parents: 109011
diff changeset
330 "The type of gateway support to use.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
331 Should be a symbol specifying how to get a connection from the local machine.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
332
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
333 Currently supported methods:
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
334 `telnet': Run telnet in a subprocess to connect;
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
335 `rlogin': Rlogin to another machine to connect;
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
336 `socks': Connect through a socks server;
57449
202c408c174b url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents: 57427
diff changeset
337 `tls': Connect with TLS;
202c408c174b url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents: 57427
diff changeset
338 `ssl': Connect with SSL (deprecated, use `tls' instead);
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
339 `native': Connect directy."
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
340 :type '(radio (const :tag "Telnet to gateway host" :value telnet)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
341 (const :tag "Rlogin to gateway host" :value rlogin)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
342 (const :tag "Use SOCKS proxy" :value socks)
57449
202c408c174b url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents: 57427
diff changeset
343 (const :tag "Use SSL/TLS for all connections" :value tls)
202c408c174b url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents: 57427
diff changeset
344 (const :tag "Use SSL for all connections (obsolete)" :value ssl)
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
345 (const :tag "Direct connection" :value native))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
346 :group 'url-hairy)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
347
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
348 (defvar url-setup-done nil "Has setup configuration been done?")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
349
57514
c386726e02a5 (url-passwd-entry-func): Var deleted.
Richard M. Stallman <rms@gnu.org>
parents: 57449
diff changeset
350 (defconst url-weekday-alist
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
351 '(("Sunday" . 0) ("Monday" . 1) ("Tuesday" . 2) ("Wednesday" . 3)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
352 ("Thursday" . 4) ("Friday" . 5) ("Saturday" . 6)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
353 ("Tues" . 2) ("Thurs" . 4)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
354 ("Sun" . 0) ("Mon" . 1) ("Tue" . 2) ("Wed" . 3)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
355 ("Thu" . 4) ("Fri" . 5) ("Sat" . 6)))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
356
57514
c386726e02a5 (url-passwd-entry-func): Var deleted.
Richard M. Stallman <rms@gnu.org>
parents: 57449
diff changeset
357 (defconst url-monthabbrev-alist
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
358 '(("Jan" . 1) ("Feb" . 2) ("Mar" . 3) ("Apr" . 4) ("May" . 5) ("Jun" . 6)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
359 ("Jul" . 7) ("Aug" . 8) ("Sep" . 9) ("Oct" . 10) ("Nov" . 11)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
360 ("Dec" . 12)))
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
361
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
362 (defvar url-lazy-message-time 0)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
363
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
364 ;; Fixme: We may not be able to run SSL.
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
365 (defvar url-extensions-header "Security/Digest Security/SSL")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
366
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
367 (defvar url-parse-syntax-table
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
368 (copy-syntax-table emacs-lisp-mode-syntax-table)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
369 "*A syntax table for parsing URLs.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
370
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
371 (modify-syntax-entry ?' "\"" url-parse-syntax-table)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
372 (modify-syntax-entry ?` "\"" url-parse-syntax-table)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
373 (modify-syntax-entry ?< "(>" url-parse-syntax-table)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
374 (modify-syntax-entry ?> ")<" url-parse-syntax-table)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
375 (modify-syntax-entry ?/ " " url-parse-syntax-table)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
376
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
377 (defvar url-load-hook nil
94429
c91f78a8a0af (url-load-hook): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents: 93975
diff changeset
378 "*Hooks to be run after initializing the URL library.")
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
379
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
380 ;;; Make OS/2 happy - yeeks
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
381 ;; (defvar tcp-binary-process-input-services nil
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
382 ;; "*Make OS/2 happy with our CRLF pairs...")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
383
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
384 (defconst url-working-buffer " *url-work")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
385
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
386 (defvar url-gateway-unplugged nil
63619
14790c6d12cd (url-gateway-unplugged): Fix spellings.
Juanma Barranquero <lekktu@gmail.com>
parents: 59996
diff changeset
387 "Non-nil means don't open new network connections.
54695
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
388 This should be set, e.g. by mail user agents rendering HTML to avoid
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
389 `bugs' which call home.")
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
390
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
391 (provide 'url-vars)
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
392
3fb37923e567 Initial revision
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
393 ;;; url-vars.el ends here