aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/browse-url.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index bdedcb2bd3e..bf179c8782a 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -877,7 +877,21 @@ The optional NEW-WINDOW argument is not used."
877 (error "Browsing URLs is not supported on this system"))) 877 (error "Browsing URLs is not supported on this system")))
878 ((eq system-type 'cygwin) 878 ((eq system-type 'cygwin)
879 (call-process "cygstart" nil nil nil url)) 879 (call-process "cygstart" nil nil nil url))
880 (t (w32-shell-execute "open" (url-unhex-string url))))) 880 (t
881 (w32-shell-execute "open"
882 ;; w32-shell-execute passes file:// URLs
883 ;; to APIs that expect file names, so we
884 ;; need to unhex any %nn encoded
885 ;; characters in the URL. We don't do
886 ;; that for other URLs; in particular,
887 ;; default Windows mail client barfs on
888 ;; quotes in the MAILTO URLs, so we prefer
889 ;; to leave the URL with its embedded %nn
890 ;; encoding intact.
891 (if (eq t (compare-strings url nil 7
892 "file://" nil nil))
893 (url-unhex-string url)
894 url)))))
881 895
882(defun browse-url-default-macosx-browser (url &optional _new-window) 896(defun browse-url-default-macosx-browser (url &optional _new-window)
883 "Invoke the macOS system's default Web browser. 897 "Invoke the macOS system's default Web browser.