diff --git a/README.org b/README.org index fe47806..068a198 100644 --- a/README.org +++ b/README.org @@ -3275,13 +3275,21 @@ Listing [[lst:configure-browse-url]] configures =browse-url=. (with-eval-after-load 'browse-url (defun browse-url-mpv (url &optional _) (start-process "mpv" nil "mpv" url)) - (custom-set-variables - '(browse-url-browser-function - `((,(rx (or "https://www.youtube.com/" "https://youtu.be/")) . browse-url-mpv) - ("https://soundcloud.com/" . browse-url-mpv) - ("." . eww-browse-url))) - `(browse-url-generic-program ,(or (when (eq system-type 'darwin) "open") - (executable-find "firefox"))))) + (if (version< emacs-version "28.0") + (custom-set-variables + '(browse-url-browser-function + `((,(rx (or "https://www.youtube.com/" "https://youtu.be/")) . browse-url-mpv) + ("https://soundcloud.com/" . browse-url-mpv) + ("." . eww-browse-url))) + `(browse-url-generic-program ,(or (when (eq system-type 'darwin) "open") + (executable-find "firefox")))) + (custom-set-variables + '(browse-url-handlers + `((,(rx (or "https://www.youtube.com/" "https://youtu.be/")) . browse-url-mpv) + ("https://soundcloud.com/" . browse-url-mpv) + ("." . eww-browse-url))) + `(browse-url-generic-program ,(or (when (eq system-type 'darwin) "open") + (executable-find "firefox")))))) #+end_src *** [[https://en.wikipedia.org/wiki/Eww_(web_browser)][Emacs Web Wowser]]