diff options
-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) |