Mercurial > hg > xemacs-beta
comparison lisp/w3/url-vars.el @ 102:a145efe76779 r20-1b3
Import from CVS: tag r20-1b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:15:49 +0200 |
parents | 0d2f883870bc |
children | 360340f9fd5f |
comparison
equal
deleted
inserted
replaced
101:a0ec055d74dd | 102:a145efe76779 |
---|---|
1 ;;; url-vars.el --- Variables for Uniform Resource Locator tool | 1 ;;; url-vars.el --- Variables for Uniform Resource Locator tool |
2 ;; Author: wmperry | 2 ;; Author: wmperry |
3 ;; Created: 1997/02/10 16:15:19 | 3 ;; Created: 1997/02/18 23:35:21 |
4 ;; Version: 1.27 | 4 ;; Version: 1.28 |
5 ;; Keywords: comm, data, processes, hypermedia | 5 ;; Keywords: comm, data, processes, hypermedia |
6 | 6 |
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 ;;; Copyright (c) 1993-1996 by William M. Perry (wmperry@cs.indiana.edu) | 8 ;;; Copyright (c) 1993-1996 by William M. Perry (wmperry@cs.indiana.edu) |
9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. | 9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. |
48 (mapcar 'make-variable-buffer-local '( | 48 (mapcar 'make-variable-buffer-local '( |
49 url-current-callback-data | 49 url-current-callback-data |
50 url-current-callback-func | 50 url-current-callback-func |
51 url-current-can-be-cached | 51 url-current-can-be-cached |
52 url-current-content-length | 52 url-current-content-length |
53 url-current-file | |
54 url-current-isindex | 53 url-current-isindex |
55 url-current-mime-encoding | 54 url-current-mime-encoding |
56 url-current-mime-headers | 55 url-current-mime-headers |
57 url-current-mime-type | 56 url-current-mime-type |
58 url-current-mime-viewer | 57 url-current-mime-viewer |
59 url-current-object | 58 url-current-object |
60 url-current-port | |
61 url-current-referer | 59 url-current-referer |
62 url-current-server | 60 |
63 url-current-type | 61 ;; obsolete |
64 url-current-user | 62 ;; url-current-file |
63 ;; url-current-port | |
64 ;; url-current-server | |
65 ;; url-current-type | |
66 ;; url-current-user | |
65 )) | 67 )) |
66 | 68 |
67 (defvar url-cookie-storage nil "Where cookies are stored.") | 69 (defvar url-cookie-storage nil "Where cookies are stored.") |
68 (defvar url-cookie-secure-storage nil "Where secure cookies are stored.") | 70 (defvar url-cookie-secure-storage nil "Where secure cookies are stored.") |
69 (defvar url-cookie-file nil "*Where cookies are stored on disk.") | 71 (defvar url-cookie-file nil "*Where cookies are stored on disk.") |
76 author or the server via the `Refresh' header in an HTTP/1.0 response. | 78 author or the server via the `Refresh' header in an HTTP/1.0 response. |
77 If nil, no refresh requests will be honored. | 79 If nil, no refresh requests will be honored. |
78 If t, all refresh requests will be honored. | 80 If t, all refresh requests will be honored. |
79 If non-nil and not t, the user will be asked for each refresh request.") | 81 If non-nil and not t, the user will be asked for each refresh request.") |
80 | 82 |
81 (defvar url-emacs-minor-version | |
82 (if (boundp 'emacs-minor-version) | |
83 (symbol-value 'emacs-minor-version) | |
84 (if (string-match "^[0-9]+\\.\\([0-9]+\\)" emacs-version) | |
85 (string-to-int | |
86 (substring emacs-version | |
87 (match-beginning 1) (match-end 1))) | |
88 0)) | |
89 "What minor version of emacs we are using.") | |
90 | |
91 (defvar url-inhibit-mime-parsing nil | 83 (defvar url-inhibit-mime-parsing nil |
92 "Whether to parse out (and delete) the MIME headers from a message.") | 84 "Whether to parse out (and delete) the MIME headers from a message.") |
93 | 85 |
94 (defvar url-automatic-caching nil | 86 (defvar url-automatic-caching nil |
95 "*If non-nil, all documents will be automatically cached to the local | 87 "*If non-nil, all documents will be automatically cached to the local |
99 (function (lambda (t1 t2) (>= (- (car t2) (car t1)) 5))) | 91 (function (lambda (t1 t2) (>= (- (car t2) (car t1)) 5))) |
100 "*A function (`funcall'able) that takes two times as its arguments, and | 92 "*A function (`funcall'able) that takes two times as its arguments, and |
101 returns non-nil if the second time is 'too old' when compared to the first | 93 returns non-nil if the second time is 'too old' when compared to the first |
102 time.") | 94 time.") |
103 | 95 |
104 (defvar url-check-md5s nil | 96 (defvar url-bug-address "wmperry@cs.indiana.edu" |
105 "*Whether to check md5s of retrieved documents or not.") | 97 "Where to send bug reports.") |
106 | |
107 (defvar url-expected-md5 nil "What md5 we expect to see.") | |
108 | |
109 (defvar url-bug-address "wmperry@cs.indiana.edu" "Where to send bug reports.") | |
110 | 98 |
111 (defvar url-cookie-confirmation nil | 99 (defvar url-cookie-confirmation nil |
112 "*If non-nil, confirmation by the user is required before accepting any | 100 "*If non-nil, confirmation by the user is required to accept HTTP cookies.") |
113 HTTP cookies.") | |
114 | 101 |
115 (defvar url-personal-mail-address nil | 102 (defvar url-personal-mail-address nil |
116 "*Your full email address. This is what is sent to HTTP/1.0 servers as | 103 "*Your full email address. |
117 the FROM field. If not set when url-do-setup is run, it defaults to | 104 This is what is sent to HTTP/1.0 servers as the FROM field in an HTTP/1.0 |
118 the value of url-pgp/pem-entity.") | 105 request.") |
119 | 106 |
120 (defvar url-directory-index-file "index.html" | 107 (defvar url-directory-index-file "index.html" |
121 "*The filename to look for when indexing a directory. If this file | 108 "*The filename to look for when indexing a directory. If this file |
122 exists, and is readable, then it will be viewed instead of | 109 exists, and is readable, then it will be viewed instead of |
123 automatically creating the directory listing.") | 110 automatically creating the directory listing.") |
124 | |
125 (defvar url-pgp/pem-entity nil | |
126 "*The users PGP/PEM id - usually their email address.") | |
127 | 111 |
128 (defvar url-privacy-level 'none | 112 (defvar url-privacy-level 'none |
129 "*How private you want your requests to be. | 113 "*How private you want your requests to be. |
130 HTTP/1.0 has header fields for various information about the user, including | 114 HTTP/1.0 has header fields for various information about the user, including |
131 operating system information, email addresses, the last page you visited, etc. | 115 operating system information, email addresses, the last page you visited, etc. |
156 This variable controls several other variables and is _NOT_ automatically | 140 This variable controls several other variables and is _NOT_ automatically |
157 updated. Call the function `url-setup-privacy-info' after modifying this | 141 updated. Call the function `url-setup-privacy-info' after modifying this |
158 variable. | 142 variable. |
159 ") | 143 ") |
160 | 144 |
161 (defvar url-uudecode-program "uudecode" "*The UUdecode executable.") | |
162 | |
163 (defvar url-uuencode-program "uuencode" "*The UUencode executable.") | |
164 | |
165 (defvar url-history-list nil "List of urls visited this session.") | 145 (defvar url-history-list nil "List of urls visited this session.") |
166 | 146 |
167 (defvar url-inhibit-uncompression nil "Do not do decompression if non-nil.") | 147 (defvar url-inhibit-uncompression nil "Do not do decompression if non-nil.") |
168 | 148 |
169 (defvar url-keep-history nil | 149 (defvar url-keep-history nil |
171 non-nil, url will keep track of all the URLS visited. | 151 non-nil, url will keep track of all the URLS visited. |
172 If eq to `t', then the list is saved to disk at the end of each emacs | 152 If eq to `t', then the list is saved to disk at the end of each emacs |
173 session.") | 153 session.") |
174 | 154 |
175 (defvar url-uncompressor-alist '((".z" . "x-gzip") | 155 (defvar url-uncompressor-alist '((".z" . "x-gzip") |
176 (".gz" . "x-gzip") | 156 (".gz" . "x-gzip") |
177 (".uue" . "x-uuencoded") | 157 (".uue" . "x-uuencoded") |
178 (".hqx" . "x-hqx") | 158 (".hqx" . "x-hqx") |
179 (".Z" . "x-compress")) | 159 (".Z" . "x-compress")) |
180 "*An assoc list of file extensions and the appropriate | 160 "*An assoc list of file extensions and the appropriate |
181 content-transfer-encodings for each.") | 161 content-transfer-encodings for each.") |
182 | |
183 (defvar url-xterm-command "xterm -title %s -ut -e %s %s %s" | |
184 "*Command used to start an xterm window.") | |
185 | |
186 (defvar url-tn3270-emulator "tn3270" | |
187 "The client to run in a subprocess to connect to a tn3270 machine.") | |
188 | |
189 (defvar url-use-transparent nil | |
190 "*Whether to use the transparent package by Brian Tompsett instead of | |
191 the builtin telnet functions. Using transparent allows you to have full | |
192 vt100 emulation in the telnet and tn3270 links.") | |
193 | 162 |
194 (defvar url-mail-command 'url-mail | 163 (defvar url-mail-command 'url-mail |
195 "*This function will be called whenever url needs to send mail. It should | 164 "*This function will be called whenever url needs to send mail. It should |
196 enter a mail-mode-like buffer in the current window. | 165 enter a mail-mode-like buffer in the current window. |
197 The commands mail-to and mail-subject should still work in this | 166 The commands mail-to and mail-subject should still work in this |
198 buffer, and it should use mail-header-separator if possible.") | 167 buffer, and it should use mail-header-separator if possible.") |
199 | |
200 (defvar url-local-exec-path nil | |
201 "*A list of possible locations for x-exec scripts.") | |
202 | 168 |
203 (defvar url-proxy-services nil | 169 (defvar url-proxy-services nil |
204 "*An assoc list of access types and servers that gateway them. | 170 "*An assoc list of access types and servers that gateway them. |
205 Looks like ((\"http\" . \"hostname:portnumber\") ....) This is set up | 171 Looks like ((\"http\" . \"hostname:portnumber\") ....) This is set up |
206 from the ACCESS_proxy environment variables in url-do-setup.") | 172 from the ACCESS_proxy environment variables in url-do-setup.") |
268 | 234 |
269 (defvar url-standalone-mode nil "*Rely solely on the cache?") | 235 (defvar url-standalone-mode nil "*Rely solely on the cache?") |
270 (defvar url-multiple-p t | 236 (defvar url-multiple-p t |
271 "*If non-nil, multiple queries are possible through ` *URL-<i>*' buffers") | 237 "*If non-nil, multiple queries are possible through ` *URL-<i>*' buffers") |
272 (defvar url-default-working-buffer " *URL*" " The default buffer to do all of the processing in.") | 238 (defvar url-default-working-buffer " *URL*" " The default buffer to do all of the processing in.") |
273 (defvar url-working-buffer url-default-working-buffer " The buffer to do all of the processing in. | 239 (defvar url-working-buffer url-default-working-buffer |
274 (It defaults to `url-default-working-buffer' and is bound to ` *URL-<i>*' buffers | 240 "The buffer to do all of the processing in. |
275 when used for multiple requests, cf. `url-multiple-p')") | 241 It defaults to `url-default-working-buffer' and is bound to *URL-<i>* |
242 buffers when used for multiple requests, cf. `url-multiple-p'") | |
276 (defvar url-current-referer nil "Referer of this page.") | 243 (defvar url-current-referer nil "Referer of this page.") |
277 (defvar url-current-content-length nil "Current content length.") | 244 (defvar url-current-content-length nil "Current content length.") |
278 (defvar url-current-file nil "Filename of current document.") | |
279 (defvar url-current-isindex nil "Is the current document a searchable index?") | 245 (defvar url-current-isindex nil "Is the current document a searchable index?") |
280 (defvar url-current-mime-encoding nil "MIME encoding of current document.") | 246 (defvar url-current-mime-encoding nil "MIME encoding of current document.") |
281 (defvar url-current-mime-headers nil "An alist of MIME headers.") | 247 (defvar url-current-mime-headers nil "An alist of MIME headers.") |
282 (defvar url-current-mime-type nil "MIME type of current document.") | 248 (defvar url-current-mime-type nil "MIME type of current document.") |
283 (defvar url-current-mime-viewer nil "How to view the current MIME doc.") | 249 (defvar url-current-mime-viewer nil "How to view the current MIME doc.") |
284 (defvar url-current-nntp-server nil "What nntp server currently opened.") | |
285 (defvar url-current-passwd-count 0 "How many times password has failed.") | 250 (defvar url-current-passwd-count 0 "How many times password has failed.") |
286 (defvar url-current-port nil "Port # of the current document.") | |
287 (defvar url-current-server nil "Server of the current document.") | |
288 (defvar url-current-user nil "Username for ftp login.") | |
289 (defvar url-current-type nil "We currently in http or file mode?") | |
290 (defvar url-gopher-types "0123456789+gIThws:;<" | 251 (defvar url-gopher-types "0123456789+gIThws:;<" |
291 "A string containing character representations of all the gopher types.") | 252 "A string containing character representations of all the gopher types.") |
292 (defvar url-mime-separator-chars (mapcar 'identity | 253 (defvar url-mime-separator-chars (mapcar 'identity |
293 (concat "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | 254 (concat "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
294 "abcdefghijklmnopqrstuvwxyz" | 255 "abcdefghijklmnopqrstuvwxyz" |
318 an assoc list of headers/contents.") | 279 an assoc list of headers/contents.") |
319 | 280 |
320 (defvar url-request-method nil "The method to use for the next request.") | 281 (defvar url-request-method nil "The method to use for the next request.") |
321 | 282 |
322 (defvar url-mime-encoding-string nil | 283 (defvar url-mime-encoding-string nil |
323 "String to send to the server in the Accept-encoding: field in HTTP/1.0 | 284 "*String to send to the server in the Accept-encoding: field in HTTP/1.0 |
324 requests. This is created automatically from mm-content-transfer-encodings.") | 285 requests. This is created automatically from mm-content-transfer-encodings.") |
325 | 286 |
326 (defvar url-mime-language-string "*" | 287 (defvar url-mime-language-string "*" |
327 "String to send to the server in the Accept-language: field in | 288 "*String to send to the server in the Accept-language: field in |
328 HTTP/1.0 requests.") | 289 HTTP/1.0 requests.") |
329 | 290 |
330 (defvar url-mime-accept-string nil | 291 (defvar url-mime-accept-string nil |
331 "String to send to the server in the Accept: field in HTTP/1.0 requests. | 292 "String to send to the server in the Accept: field in HTTP/1.0 requests. |
332 This is created automatically from url-mime-viewers, after the mailcap file | 293 This is created automatically from url-mime-viewers, after the mailcap file |
349 (defvar url-os-type nil "What OS we are on.") | 310 (defvar url-os-type nil "What OS we are on.") |
350 | 311 |
351 (defvar url-max-password-attempts 5 | 312 (defvar url-max-password-attempts 5 |
352 "*Maximum number of times a password will be prompted for when a | 313 "*Maximum number of times a password will be prompted for when a |
353 protected document is denied by the server.") | 314 protected document is denied by the server.") |
354 | |
355 (defvar url-wais-to-mime | |
356 '( | |
357 ("WSRC" . "application/x-wais-source") ; A database description | |
358 ("TEXT" . "text/plain") ; plain text | |
359 ) | |
360 "An assoc list of wais doctypes and their corresponding MIME | |
361 content-types.") | |
362 | |
363 (defvar url-waisq-prog "waisq" | |
364 "*Name of the waisq executable on this system. This should be the | |
365 waisq program from think.com's wais8-b5.1 distribution.") | |
366 | |
367 (defvar url-wais-gateway-server "www.ncsa.uiuc.edu" | |
368 "*The machine name where the WAIS gateway lives.") | |
369 | |
370 (defvar url-wais-gateway-port "8001" | |
371 "*The port # of the WAIS gateway.") | |
372 | 315 |
373 (defvar url-temporary-directory "/tmp" "*Where temporary files go.") | 316 (defvar url-temporary-directory "/tmp" "*Where temporary files go.") |
374 | 317 |
375 (defvar url-show-status t | 318 (defvar url-show-status t |
376 "*Whether to show a running total of bytes transferred. Can cause a | 319 "*Whether to show a running total of bytes transferred. Can cause a |
415 | 358 |
416 (defvar url-nonrelative-link | 359 (defvar url-nonrelative-link |
417 "^\\([-a-zA-Z0-9+.]+:\\)" | 360 "^\\([-a-zA-Z0-9+.]+:\\)" |
418 "A regular expression that will match an absolute URL.") | 361 "A regular expression that will match an absolute URL.") |
419 | 362 |
420 (defvar url-configuration-directory nil | |
421 "*Where the URL configuration files can be found.") | |
422 | |
423 (defvar url-confirmation-func 'y-or-n-p | 363 (defvar url-confirmation-func 'y-or-n-p |
424 "*What function to use for asking yes or no functions. Possible | 364 "*What function to use for asking yes or no functions. Possible |
425 values are 'yes-or-no-p or 'y-or-n-p, or any function that takes a | 365 values are 'yes-or-no-p or 'y-or-n-p, or any function that takes a |
426 single argument (the prompt), and returns t only if a positive answer | 366 single argument (the prompt), and returns t only if a positive answer |
427 is gotten.") | 367 is gotten.") |
428 | |
429 (defvar url-find-this-link nil "Link to go to within a document.") | |
430 | 368 |
431 (defvar url-gateway-method 'native | 369 (defvar url-gateway-method 'native |
432 "*The type of gateway support to use. | 370 "*The type of gateway support to use. |
433 Should be a symbol specifying how we are to get a connection off of the | 371 Should be a symbol specifying how we are to get a connection off of the |
434 local machine. | 372 local machine. |
443 url-gateway-method to be 'native. | 381 url-gateway-method to be 'native. |
444 'native :: Use the native open-network-stream in emacs | 382 'native :: Use the native open-network-stream in emacs |
445 ") | 383 ") |
446 | 384 |
447 (defvar url-running-xemacs (string-match "XEmacs" emacs-version) | 385 (defvar url-running-xemacs (string-match "XEmacs" emacs-version) |
448 "*In XEmacs?.") | 386 "*Got XEmacs?") |
449 | 387 |
450 (defvar url-default-ports '(("http" . "80") | 388 (defvar url-default-ports '(("http" . "80") |
451 ("gopher" . "70") | 389 ("gopher" . "70") |
452 ("telnet" . "23") | 390 ("telnet" . "23") |
453 ("news" . "119") | 391 ("news" . "119") |