Mercurial > emacs
annotate lisp/url/url-https.el @ 61778:1b44d34506e4
Require select. Set selection-coding-system to
mac-system-coding-system. Call menu-bar-enable-clipboard.
(x-last-selected-text-clipboard, x-last-selected-text-primary)
(x-select-enable-clipboard): New variables.
(x-select-text, x-get-selection, x-selection-value)
(x-get-selection-value, mac-select-convert-to-string)
(mac-services-open-file, mac-services-open-selection)
(mac-services-insert-text): New functions.
(CLIPBOARD, FIND): Put mac-scrap-name property.
(com.apple.traditional-mac-plain-text, public.utf16-plain-text)
(public.tiff): Put mac-ostype property.
(selection-converter-alist): Add entries for them.
(mac-application-menu-map): New keymap.
(interprogram-cut-function, interprogram-paste-function): Set to
x-select-text and x-get-selection-value, respectively.
(split-window-keep-point): Set to t.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Sun, 24 Apr 2005 05:59:52 +0000 |
parents | 202c408c174b |
children | a8fa7c632ee4 e86fc76a45e4 |
rev | line source |
---|---|
57449
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
1 ;;; url-https.el --- HTTP over SSL/TLS routines |
54933
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
2 |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
3 ;; Copyright (c) 1999, 2004 Free Software Foundation, Inc. |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
4 |
54695 | 5 ;; Keywords: comm, data, processes |
6 | |
54933
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
7 ;; This file is part of GNU Emacs. |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
8 ;; |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
9 ;; GNU Emacs is free software; you can redistribute it and/or modify |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
10 ;; it under the terms of the GNU General Public License as published by |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
11 ;; the Free Software Foundation; either version 2, or (at your option) |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
12 ;; any later version. |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
13 ;; |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
14 ;; GNU Emacs is distributed in the hope that it will be useful, |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
17 ;; GNU General Public License for more details. |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
18 ;; |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
19 ;; You should have received a copy of the GNU General Public License |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
22 ;; Boston, MA 02111-1307, USA. |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
23 |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
24 ;;; Commentary: |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
25 |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
26 ;;; Code: |
54695 | 27 |
28 (require 'url-gw) | |
29 (require 'url-util) | |
30 (require 'url-parse) | |
31 (require 'url-cookie) | |
32 (require 'url-http) | |
57449
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
33 (require 'tls) |
54695 | 34 |
35 (defconst url-https-default-port 443 "Default HTTPS port.") | |
36 (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") | |
37 (defalias 'url-https-expand-file-name 'url-http-expand-file-name) | |
38 | |
39 (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
|
40 `(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
|
41 ,(format "HTTPS wrapper around `%s' call." (or method "url-http")) |
57449
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
42 (let ((url-gateway-method (condition-case () |
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
43 (require 'ssl) |
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
44 (error 'tls)))) |
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
45 (,(intern (format (if method "url-http-%s" "url-http") method)) |
202c408c174b
url-vars.el (url-gateway-method): Add new method `tls'.
Simon Josefsson <jas@extundo.com>
parents:
54933
diff
changeset
|
46 ,@(remove '&rest (remove '&optional args)))))) |
54695 | 47 |
48 (url-https-create-secure-wrapper nil (url callback cbargs)) | |
49 (url-https-create-secure-wrapper file-exists-p (url)) | |
50 (url-https-create-secure-wrapper file-readable-p (url)) | |
54933
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
51 (url-https-create-secure-wrapper file-attributes (url &optional id-format)) |
54695 | 52 |
53 (provide 'url-https) | |
54699 | 54 |
54933
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
55 ;; arch-tag: c3645ac5-c248-4d12-ad41-7c4b6f7b6d19 |
1ebec6b5e54f
(url-https-file-attributes): Add id-format param.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
54798
diff
changeset
|
56 ;;; url-https.el ends here |