diff options
| author | Po Lu | 2024-02-15 14:23:43 +0800 |
|---|---|---|
| committer | Po Lu | 2024-02-15 14:24:21 +0800 |
| commit | 783a511d1e31b5c9e5f9cb8ec27fd91d1b9078c9 (patch) | |
| tree | c84409a512b5d999d64a9bd2119e41ab56ed36d3 /src/androidselect.c | |
| parent | 377e4212e9df293ba2021238bae2bdccf5c8b8d3 (diff) | |
| download | emacs-783a511d1e31b5c9e5f9cb8ec27fd91d1b9078c9.tar.gz emacs-783a511d1e31b5c9e5f9cb8ec27fd91d1b9078c9.zip | |
Handle /assets and /content file names in `android-browse-url'
* lisp/net/browse-url.el (android-browse-url): New function.
* lisp/term/android-win.el (android-browse-url-internal): Update
function declaration.
* src/androidselect.c (Fandroid_browse_url): Rename to...
(Fandroid_browse_url_internal): ... this.
(syms_of_androidselect): Adjust to match.
Diffstat (limited to 'src/androidselect.c')
| -rw-r--r-- | src/androidselect.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/androidselect.c b/src/androidselect.c index 5b23c559d2c..61f1c6045db 100644 --- a/src/androidselect.c +++ b/src/androidselect.c | |||
| @@ -237,15 +237,21 @@ DEFUN ("android-clipboard-exists-p", Fandroid_clipboard_exists_p, | |||
| 237 | return rc ? Qt : Qnil; | 237 | return rc ? Qt : Qnil; |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | DEFUN ("android-browse-url", Fandroid_browse_url, | 240 | DEFUN ("android-browse-url-internal", Fandroid_browse_url_internal, |
| 241 | Sandroid_browse_url, 1, 2, 0, | 241 | Sandroid_browse_url_internal, 1, 2, 0, |
| 242 | doc: /* Open URL in an external application. URL should be a | 242 | doc: /* Open URL in an external application. |
| 243 | URL-encoded URL with a scheme specified unless SEND is non-nil. | 243 | |
| 244 | Signal an error upon failure. | 244 | URL should be a URL-encoded URL with a scheme specified unless SEND is |
| 245 | non-nil. Signal an error upon failure. | ||
| 245 | 246 | ||
| 246 | If SEND is nil, start a program that is able to display the URL, such | 247 | If SEND is nil, start a program that is able to display the URL, such |
| 247 | as a web browser. Otherwise, try to share URL using programs such as | 248 | as a web browser. Otherwise, try to share URL using programs such as |
| 248 | email clients. */) | 249 | email clients. |
| 250 | |||
| 251 | If URL is a file URI, convert it into a `content' address accessible to | ||
| 252 | other programs. Files inside the /content or /assets directories cannot | ||
| 253 | be opened through such addresses, which this function does not provide | ||
| 254 | for. Use `android-browse-url' instead. */) | ||
| 249 | (Lisp_Object url, Lisp_Object send) | 255 | (Lisp_Object url, Lisp_Object send) |
| 250 | { | 256 | { |
| 251 | Lisp_Object value; | 257 | Lisp_Object value; |
| @@ -803,7 +809,7 @@ syms_of_androidselect (void) | |||
| 803 | defsubr (&Sandroid_set_clipboard); | 809 | defsubr (&Sandroid_set_clipboard); |
| 804 | defsubr (&Sandroid_get_clipboard); | 810 | defsubr (&Sandroid_get_clipboard); |
| 805 | defsubr (&Sandroid_clipboard_exists_p); | 811 | defsubr (&Sandroid_clipboard_exists_p); |
| 806 | defsubr (&Sandroid_browse_url); | 812 | defsubr (&Sandroid_browse_url_internal); |
| 807 | defsubr (&Sandroid_get_clipboard_targets); | 813 | defsubr (&Sandroid_get_clipboard_targets); |
| 808 | defsubr (&Sandroid_get_clipboard_data); | 814 | defsubr (&Sandroid_get_clipboard_data); |
| 809 | 815 | ||