diff options
author | jao <jao@gnu.org> | 2025-09-22 01:03:36 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2025-09-22 01:03:36 +0100 |
commit | ab86fe6353d5566d62a71a2d80665d330fb705ed (patch) | |
tree | 75b887c7e8001a5ee37092bb797debc3fddf0800 | |
parent | 3e78e4be20183ad690e85ba7052b9495dfa649f2 (diff) | |
download | elibs-ab86fe6353d5566d62a71a2d80665d330fb705ed.tar.gz elibs-ab86fe6353d5566d62a71a2d80665d330fb705ed.tar.bz2 |
browser-url-handlers for darwin
-rw-r--r-- | custom/jao-custom-browse.el | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/custom/jao-custom-browse.el b/custom/jao-custom-browse.el index ec5a000..1f7ccc3 100644 --- a/custom/jao-custom-browse.el +++ b/custom/jao-custom-browse.el @@ -159,7 +159,9 @@ "\\)\\'")) (defun jao--see (url &rest _r) - (start-process-shell-command "see" nil (format "see %s" (jao--fln url)))) + (start-process-shell-command "see" nil + (format (jao-d-l "open %s" "see %s") + (jao--fln url)))) (defun jao--find-file-other-window (url &rest _) (find-file-other-window (jao--fln url))) @@ -173,7 +175,16 @@ (defun jao-browse-url-browse (&rest args) (apply jao-browse-url-function args)) -(jao-when-linux +(jao-d-l + (setq browse-url-handlers + `((jao-video--url-p . jao--see) + (,jao--doc-exts . jao--see) + (,jao--see-exts . jao--see) + ("^file://?.+\\.html?$" . ,jao-browse-url-function) + ("^file://?" . jao--find-file-other-window) + (,jao-browse--external-regexp . ,jao-browse-url-external-function) + (,jao-browse--sound-rx . jao--see) + ("." . jao-browse-url-browse))) (setq browse-url-handlers `((jao-video--url-p . jao-maybe-view-video) (,jao--doc-exts . jao--browse-doc) |