54695
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
1 ;;; url-vars.el --- Variables for Uniform Resource Locator tool
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
2 ;; Keywords: comm, data, processes, hypermedia
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
3
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
5 ;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
6 ;;; Copyright (c) 1996, 97, 98, 99, 2001 Free Software Foundation, Inc.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
7 ;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
8 ;;; This file is part of GNU Emacs.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
9 ;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
10 ;;; GNU Emacs is free software; you can redistribute it and/or modify
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
11 ;;; it under the terms of the GNU General Public License as published by
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
12 ;;; the Free Software Foundation; either version 2, or (at your option)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
13 ;;; any later version.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
14 ;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
15 ;;; GNU Emacs is distributed in the hope that it will be useful,
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
16 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
18 ;;; GNU General Public License for more details.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
19 ;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
20 ;;; You should have received a copy of the GNU General Public License
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
21 ;;; along with GNU Emacs; see the file COPYING. If not, write to the
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
22 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
23 ;;; Boston, MA 02111-1307, USA.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
24 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
25
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
26 (require 'mm-util)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
27
|
54770
|
28 (defconst url-version "Emacs"
|
54695
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
29 "Version number of URL package.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
30
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
31 (defgroup url nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
32 "Uniform Resource Locator tool"
|
54804
|
33 :version "21.4"
|
54695
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
34 :group 'hypermedia)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
35
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
36 (defgroup url-file nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
37 "URL storage"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
38 :prefix "url-"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
39 :group 'url)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
40
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
41 (defgroup url-cache nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
42 "URL cache"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
43 :prefix "url-"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
44 :prefix "url-cache-"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
45 :group 'url)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
46
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
47 (defgroup url-mime nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
48 "MIME options of URL"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
49 :prefix "url-"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
50 :group 'url)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
51
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
52 (defgroup url-hairy nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
53 "Hairy options of URL"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
54 :prefix "url-"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
55 :group 'url)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
56
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
57
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
58 (defvar url-current-object nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
59 "A parsed representation of the current url.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
60
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
61 (defvar url-current-mime-headers nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
62 "A parsed representation of the MIME headers for the current url.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
63
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
64 (mapcar 'make-variable-buffer-local
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
65 '(
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
66 url-current-object
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
67 url-current-referer
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
68 url-current-mime-headers
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
69 ))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
70
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
71 (defcustom url-honor-refresh-requests t
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
72 "*Whether to do automatic page reloads.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
73 These are done at the request of the document author or the server via
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
74 the `Refresh' header in an HTTP response. If nil, no refresh
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
75 requests will be honored. If t, all refresh requests will be honored.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
76 If non-nil and not t, the user will be asked for each refresh
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
77 request."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
78 :type '(choice (const :tag "off" nil)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
79 (const :tag "on" t)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
80 (const :tag "ask" 'ask))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
81 :group 'url-hairy)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
82
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
83 (defcustom url-automatic-caching nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
84 "*If non-nil, all documents will be automatically cached to the local disk."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
85 :type 'boolean
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
86 :group 'url-cache)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
87
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
88 ;; Fixme: sanitize this.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
89 (defcustom url-cache-expired
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
90 (lambda (t1 t2) (>= (- (car t2) (car t1)) 5))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
91 "*A function determining if a cached item has expired.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
92 It takes two times (numbers) as its arguments, and returns non-nil if
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
93 the second time is 'too old' when compared to the first time."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
94 :type 'function
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
95 :group 'url-cache)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
96
|
54804
|
97 (defconst url-bug-address "bug-gnu-emacs@gnu.org"
|
54695
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
98 "Where to send bug reports.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
99
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
100 (defcustom url-personal-mail-address nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
101 "*Your full email address.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
102 This is what is sent to HTTP servers as the FROM field in an HTTP
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
103 request."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
104 :type '(choice (const :tag "Unspecified" nil) string)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
105 :group 'url)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
106
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
107 (defcustom url-directory-index-file "index.html"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
108 "*The filename to look for when indexing a directory.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
109 If this file exists, and is readable, then it will be viewed instead of
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
110 using `dired' to view the directory."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
111 :type 'string
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
112 :group 'url-file)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
113
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
114 ;; Fixme: this should have a setter which calls url-setup-privacy-info.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
115 (defcustom url-privacy-level '(email)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
116 "*How private you want your requests to be.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
117 HTTP has header fields for various information about the user, including
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
118 operating system information, email addresses, the last page you visited, etc.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
119 This variable controls how much of this information is sent.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
120
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
121 This should a symbol or a list.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
122 Valid values if a symbol are:
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
123 none -- Send all information
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
124 low -- Don't send the last location
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
125 high -- Don't send the email address or last location
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
126 paranoid -- Don't send anything
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
127
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
128 If a list, this should be a list of symbols of what NOT to send.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
129 Valid symbols are:
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
130 email -- the email address
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
131 os -- the operating system info
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
132 lastloc -- the last location
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
133 agent -- Do not send the User-Agent string
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
134 cookie -- never accept HTTP cookies
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
135
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
136 Samples:
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
137
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
138 (setq url-privacy-level 'high)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
139 (setq url-privacy-level '(email lastloc)) ;; equivalent to 'high
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
140 (setq url-privacy-level '(os))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
141
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
142 ::NOTE::
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
143 This variable controls several other variables and is _NOT_ automatically
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
144 updated. Call the function `url-setup-privacy-info' after modifying this
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
145 variable."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
146 :type '(radio (const :tag "None (you believe in the basic goodness of humanity)"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
147 :value none)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
148 (const :tag "Low (do not reveal last location)"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
149 :value low)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
150 (const :tag "High (no email address or last location)"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
151 :value high)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
152 (const :tag "Paranoid (reveal nothing!)"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
153 :value paranoid)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
154 (checklist :tag "Custom"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
155 (const :tag "Email address" :value email)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
156 (const :tag "Operating system" :value os)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
157 (const :tag "Last location" :value lastloc)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
158 (const :tag "Browser identification" :value agent)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
159 (const :tag "No cookies" :value cookie)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
160 :group 'url)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
161
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
162 (defvar url-inhibit-uncompression nil "Do not do decompression if non-nil.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
163
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
164 (defcustom url-uncompressor-alist '((".z" . "x-gzip")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
165 (".gz" . "x-gzip")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
166 (".uue" . "x-uuencoded")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
167 (".hqx" . "x-hqx")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
168 (".Z" . "x-compress")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
169 (".bz2" . "x-bzip2"))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
170 "*An alist of file extensions and appropriate content-transfer-encodings."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
171 :type '(repeat (cons :format "%v"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
172 (string :tag "Extension")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
173 (string :tag "Encoding")))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
174 :group 'url-mime)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
175
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
176 (defcustom url-mail-command (if (fboundp 'compose-mail)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
177 'compose-mail
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
178 'url-mail)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
179 "*This function will be called whenever url needs to send mail.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
180 It should enter a mail-mode-like buffer in the current window.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
181 The commands `mail-to' and `mail-subject' should still work in this
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
182 buffer, and it should use `mail-header-separator' if possible."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
183 :type 'function
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
184 :group 'url)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
185
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
186 (defcustom url-proxy-services nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
187 "*An alist of schemes and proxy servers that gateway them.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
188 Looks like ((\"http\" . \"hostname:portnumber\") ...). This is set up
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
189 from the ACCESS_proxy environment variables."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
190 :type '(repeat (cons :format "%v"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
191 (string :tag "Protocol")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
192 (string :tag "Proxy")))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
193 :group 'url)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
194
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
195 (defcustom url-passwd-entry-func nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
196 "*Symbol indicating which function to call to read in a password.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
197 It will be set up depending on whether you are running EFS or ange-ftp
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
198 at startup if it is nil. This function should accept the prompt
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
199 string as its first argument, and the default value as its second
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
200 argument."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
201 :type '(choice (const :tag "Guess" :value nil)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
202 (const :tag "Use Ange-FTP" :value ange-ftp-read-passwd)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
203 (const :tag "Use EFS" :value efs-read-passwd)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
204 (const :tag "Use Password Package" :value read-passwd)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
205 (function :tag "Other"))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
206 :group 'url-hairy)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
207
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
208 (defcustom url-standalone-mode nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
209 "*Rely solely on the cache?"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
210 :type 'boolean
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
211 :group 'url-cache)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
212
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
213 (defvar url-mime-separator-chars (mapcar 'identity
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
214 (concat "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
215 "abcdefghijklmnopqrstuvwxyz"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
216 "0123456789'()+_,-./=?"))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
217 "Characters allowable in a MIME multipart separator.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
218
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
219 (defcustom url-bad-port-list
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
220 '("25" "119" "19")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
221 "*List of ports to warn the user about connecting to.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
222 Defaults to just the mail, chargen, and NNTP ports so you cannot be
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
223 tricked into sending fake mail or forging messages by a malicious HTML
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
224 document."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
225 :type '(repeat (string :tag "Port"))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
226 :group 'url-hairy)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
227
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
228 (defvar url-mime-content-type-charset-regexp
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
229 ";[ \t]*charset=\"?\\([^\"]+\\)\"?"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
230 "Regexp used in parsing `Content-Type' for a charset indication.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
231
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
232 (defvar url-request-data nil "Any data to send with the next request.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
233
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
234 (defvar url-request-extra-headers nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
235 "A list of extra headers to send with the next request.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
236 Should be an assoc list of headers/contents.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
237
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
238 (defvar url-request-method nil "The method to use for the next request.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
239
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
240 ;; FIXME!! (RFC 2616 gives examples like `compress, gzip'.)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
241 (defvar url-mime-encoding-string nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
242 "*String to send in the Accept-encoding: field in HTTP requests.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
243
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
244 ;; `mm-mime-mule-charset-alist' in Gnus 5.8/9 contains elements whose
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
245 ;; cars aren't valid MIME charsets/coding systems, at least in Emacs.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
246 ;; This gets it correct by construction in Emacs. Fixme: DTRT for
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
247 ;; XEmacs -- its `coding-system-list' doesn't have the BASE-ONLY arg.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
248 (when (and (not (featurep 'xemacs))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
249 (fboundp 'coding-system-list))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
250 (setq mm-mime-mule-charset-alist
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
251 (apply
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
252 'nconc
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
253 (mapcar
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
254 (lambda (cs)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
255 (when (and (coding-system-get cs 'mime-charset)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
256 (not (eq t (coding-system-get cs 'safe-charsets))))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
257 (list (cons (coding-system-get cs 'mime-charset)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
258 (delq 'ascii
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
259 (coding-system-get cs 'safe-charsets))))))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
260 (coding-system-list 'base-only)))))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
261
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
262 ;; Perhaps the first few should actually be given decreasing `q's and
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
263 ;; the list should be trimmed significantly.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
264 ;; Fixme: do something sane if we don't have `sort-coding-systems'
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
265 ;; (Emacs 20, XEmacs).
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
266 (defun url-mime-charset-string ()
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
267 "Generate a list of preferred MIME charsets for HTTP requests.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
268 Generated according to current coding system priorities."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
269 (if (fboundp 'sort-coding-systems)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
270 (let ((ordered (sort-coding-systems
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
271 (let (accum)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
272 (dolist (elt mm-mime-mule-charset-alist)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
273 (if (mm-coding-system-p (car elt))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
274 (push (car elt) accum)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
275 (nreverse accum)))))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
276 (concat (format "%s;q=1, " (pop ordered))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
277 (mapconcat 'symbol-name ordered ";q=0.5, ")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
278 ";q=0.5"))))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
279
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
280 (defvar url-mime-charset-string (url-mime-charset-string)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
281 "*String to send in the Accept-charset: field in HTTP requests.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
282 The MIME charset corresponding to the most preferred coding system is
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
283 given priority 1 and the rest are given priority 0.5.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
284
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
285 (defun url-set-mime-charset-string ()
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
286 (setq url-mime-charset-string (url-mime-charset-string)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
287 ;; Regenerate if the language environment changes.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
288 (add-hook 'set-language-environment-hook 'url-set-mime-charset-string)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
289
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
290 ;; Fixme: set from the locale.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
291 (defcustom url-mime-language-string nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
292 "*String to send in the Accept-language: field in HTTP requests.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
293
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
294 Specifies the preferred language when servers can serve documents in
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
295 several languages. Use RFC 1766 abbreviations, e.g.@: `en' for
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
296 English, `de' for German. A comma-separated specifies descending
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
297 order of preference. The ordering can be made explicit using `q'
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
298 factors defined by HTTP, e.g. `de,en-gb;q=0.8,en;q=0.7'. `*' means
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
299 get the first available language (as opposed to the default)."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
300 :type '(radio
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
301 (const :tag "None (get default language version)" :value nil)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
302 (const :tag "Any (get first available language version)" :value "*")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
303 (string :tag "Other"))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
304 :group 'url-mime
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
305 :group 'i18n)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
306
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
307 (defvar url-mime-accept-string nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
308 "String to send to the server in the Accept: field in HTTP requests.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
309
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
310 (defvar url-package-version nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
311 "Version number of package using URL.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
312
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
313 (defvar url-package-name nil "Version number of package using URL.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
314
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
315 (defvar url-system-type nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
316 "What type of system we are on.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
317 (defvar url-os-type nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
318 "What OS we are on.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
319
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
320 (defcustom url-max-password-attempts 5
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
321 "*Maximum number of times a password will be prompted for.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
322 Applies when a protected document is denied by the server."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
323 :type 'integer
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
324 :group 'url)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
325
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
326 (defcustom url-temporary-directory (or (getenv "TMPDIR") "/tmp")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
327 "*Where temporary files go."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
328 :type 'directory
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
329 :group 'url-file)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
330
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
331 (defcustom url-show-status t
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
332 "*Whether to show a running total of bytes transferred.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
333 Can cause a large hit if using a remote X display over a slow link, or
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
334 a terminal with a slow modem."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
335 :type 'boolean
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
336 :group 'url)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
337
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
338 (defvar url-using-proxy nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
339 "Either nil or the fully qualified proxy URL in use, e.g.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
340 http://www.domain.com/")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
341
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
342 (defcustom url-news-server nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
343 "*The default news server from which to get newsgroups/articles.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
344 Applies if no server is specified in the URL. Defaults to the
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
345 environment variable NNTPSERVER or \"news\" if NNTPSERVER is
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
346 undefined."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
347 :type '(choice (const :tag "None" :value nil) string)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
348 :group 'url)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
349
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
350 (defvar url-nonrelative-link
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
351 "\\`\\([-a-zA-Z0-9+.]+:\\)"
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
352 "A regular expression that will match an absolute URL.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
353
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
354 (defcustom url-confirmation-func 'y-or-n-p
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
355 "*What function to use for asking yes or no functions.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
356 Possible values are `yes-or-no-p' or `y-or-n-p', or any function that
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
357 takes a single argument (the prompt), and returns t only if a positive
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
358 answer is given."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
359 :type '(choice (const :tag "Short (y or n)" :value y-or-n-p)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
360 (const :tag "Long (yes or no)" :value yes-or-no-p)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
361 (function :tag "Other"))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
362 :group 'url-hairy)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
363
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
364 (defcustom url-gateway-method 'native
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
365 "*The type of gateway support to use.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
366 Should be a symbol specifying how to get a connection from the local machine.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
367
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
368 Currently supported methods:
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
369 `telnet': Run telnet in a subprocess to connect;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
370 `rlogin': Rlogin to another machine to connect;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
371 `socks': Connect through a socks server;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
372 `ssl': Connect with SSL;
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
373 `native': Connect directy."
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
374 :type '(radio (const :tag "Telnet to gateway host" :value telnet)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
375 (const :tag "Rlogin to gateway host" :value rlogin)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
376 (const :tag "Use SOCKS proxy" :value socks)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
377 (const :tag "Use SSL for all connections" :value ssl)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
378 (const :tag "Direct connection" :value native))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
379 :group 'url-hairy)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
380
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
381 (defvar url-setup-done nil "Has setup configuration been done?")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
382
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
383 (defconst weekday-alist
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
384 '(("Sunday" . 0) ("Monday" . 1) ("Tuesday" . 2) ("Wednesday" . 3)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
385 ("Thursday" . 4) ("Friday" . 5) ("Saturday" . 6)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
386 ("Tues" . 2) ("Thurs" . 4)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
387 ("Sun" . 0) ("Mon" . 1) ("Tue" . 2) ("Wed" . 3)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
388 ("Thu" . 4) ("Fri" . 5) ("Sat" . 6)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
389
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
390 (defconst monthabbrev-alist
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
391 '(("Jan" . 1) ("Feb" . 2) ("Mar" . 3) ("Apr" . 4) ("May" . 5) ("Jun" . 6)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
392 ("Jul" . 7) ("Aug" . 8) ("Sep" . 9) ("Oct" . 10) ("Nov" . 11)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
393 ("Dec" . 12)))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
394
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
395 (defvar url-lazy-message-time 0)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
396
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
397 ;; Fixme: We may not be able to run SSL.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
398 (defvar url-extensions-header "Security/Digest Security/SSL")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
399
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
400 (defvar url-parse-syntax-table
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
401 (copy-syntax-table emacs-lisp-mode-syntax-table)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
402 "*A syntax table for parsing URLs.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
403
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
404 (modify-syntax-entry ?' "\"" url-parse-syntax-table)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
405 (modify-syntax-entry ?` "\"" url-parse-syntax-table)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
406 (modify-syntax-entry ?< "(>" url-parse-syntax-table)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
407 (modify-syntax-entry ?> ")<" url-parse-syntax-table)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
408 (modify-syntax-entry ?/ " " url-parse-syntax-table)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
409
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
410 (defvar url-load-hook nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
411 "*Hooks to be run after initalizing the URL library.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
412
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
413 ;;; Make OS/2 happy - yeeks
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
414 ;; (defvar tcp-binary-process-input-services nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
415 ;; "*Make OS/2 happy with our CRLF pairs...")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
416
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
417 (defconst url-working-buffer " *url-work")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
418
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
419 (defvar url-gateway-unplugged nil
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
420 "Non-nil means don't open new network connexions.
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
421 This should be set, e.g. by mail user agents rendering HTML to avoid
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
422 `bugs' which call home.")
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
423
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
424 (defun url-vars-unload-hook ()
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
425 (remove-hook 'set-language-environment-hook 'url-set-mime-charset-string))
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
426
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
427 (provide 'url-vars)
|
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
428
|
54699
|
429 ;;; arch-tag: 29205e5f-c5ce-433c-8d5d-38cbaed64b49
|
54695
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff
changeset
|
430 ;;; url-vars.el ends here
|