aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidselect.c
diff options
context:
space:
mode:
authorPo Lu2024-02-15 14:23:43 +0800
committerPo Lu2024-02-15 14:24:21 +0800
commit783a511d1e31b5c9e5f9cb8ec27fd91d1b9078c9 (patch)
treec84409a512b5d999d64a9bd2119e41ab56ed36d3 /src/androidselect.c
parent377e4212e9df293ba2021238bae2bdccf5c8b8d3 (diff)
downloademacs-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.c20
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
240DEFUN ("android-browse-url", Fandroid_browse_url, 240DEFUN ("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.
243URL-encoded URL with a scheme specified unless SEND is non-nil. 243
244Signal an error upon failure. 244URL should be a URL-encoded URL with a scheme specified unless SEND is
245non-nil. Signal an error upon failure.
245 246
246If SEND is nil, start a program that is able to display the URL, such 247If SEND is nil, start a program that is able to display the URL, such
247as a web browser. Otherwise, try to share URL using programs such as 248as a web browser. Otherwise, try to share URL using programs such as
248email clients. */) 249email clients.
250
251If URL is a file URI, convert it into a `content' address accessible to
252other programs. Files inside the /content or /assets directories cannot
253be opened through such addresses, which this function does not provide
254for. 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