Mercurial > emacs
annotate lisp/url/url-https.el @ 54798:faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Mon, 12 Apr 2004 04:04:21 +0000 |
| parents | e8824c4f5f7e |
| children | 1ebec6b5e54f eb7e8d483840 |
| rev | line source |
|---|---|
| 54695 | 1 ;;; url-https.el --- HTTP over SSL routines |
| 2 ;; Keywords: comm, data, processes | |
| 3 | |
| 4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| 5 ;;; Copyright (c) 1999 Free Software Foundation, Inc. | |
| 6 ;;; | |
| 7 ;;; This file is part of GNU Emacs. | |
| 8 ;;; | |
| 9 ;;; GNU Emacs is free software; you can redistribute it and/or modify | |
| 10 ;;; it under the terms of the GNU General Public License as published by | |
| 11 ;;; the Free Software Foundation; either version 2, or (at your option) | |
| 12 ;;; any later version. | |
| 13 ;;; | |
| 14 ;;; GNU Emacs is distributed in the hope that it will be useful, | |
| 15 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 ;;; GNU General Public License for more details. | |
| 18 ;;; | |
| 19 ;;; You should have received a copy of the GNU General Public License | |
| 20 ;;; along with GNU Emacs; see the file COPYING. If not, write to the | |
| 21 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| 22 ;;; Boston, MA 02111-1307, USA. | |
| 23 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| 24 | |
| 25 (require 'url-gw) | |
| 26 (require 'url-util) | |
| 27 (require 'url-parse) | |
| 28 (require 'url-cookie) | |
| 29 (require 'url-http) | |
| 30 | |
| 31 (defconst url-https-default-port 443 "Default HTTPS port.") | |
| 32 (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") | |
| 33 (defalias 'url-https-expand-file-name 'url-http-expand-file-name) | |
| 34 | |
| 35 (defmacro url-https-create-secure-wrapper (method args) | |
|
54798
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
36 `(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args |
|
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
37 ,(format "HTTPS wrapper around `%s' call." (or method "url-http")) |
|
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
38 (condition-case () |
|
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
39 (require 'ssl) |
|
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
40 (error |
|
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
41 (error "HTTPS support could not find `ssl' library"))) |
|
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
42 (let ((url-gateway-method 'ssl)) |
|
faaf1fc90954
(url-https-create-secure-wrapper): Use modern backquotes.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54770
diff
changeset
|
43 ( ,(intern (format (if method "url-http-%s" "url-http") method)) ,@(remove '&rest (remove '&optional args)))))) |
| 54695 | 44 |
| 45 (url-https-create-secure-wrapper nil (url callback cbargs)) | |
| 46 (url-https-create-secure-wrapper file-exists-p (url)) | |
| 47 (url-https-create-secure-wrapper file-readable-p (url)) | |
| 48 (url-https-create-secure-wrapper file-attributes (url)) | |
| 49 | |
| 50 (provide 'url-https) | |
| 54699 | 51 |
| 52 ;;; arch-tag: c3645ac5-c248-4d12-ad41-7c4b6f7b6d19 |
