diff options
author | Glenn Morris <rgm@gnu.org> | 2018-05-07 07:50:49 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2018-05-07 07:50:49 -0700 |
commit | 766b057e41df7316808ec7658836fda75facda75 (patch) | |
tree | 9f35f8fdc99192a66c01c10b8a6b3cae1fb6ebd4 /lisp/net/browse-url.el | |
parent | 6e362a32bc9d21f73a0f29ca6f45481edeea6f29 (diff) | |
parent | 1d732d699d63b5dbfa7d0a0f44e6119d58f852bc (diff) | |
download | emacs-766b057e41df7316808ec7658836fda75facda75.tar.gz emacs-766b057e41df7316808ec7658836fda75facda75.tar.bz2 emacs-766b057e41df7316808ec7658836fda75facda75.zip |
Merge from origin/emacs-26
1d732d6 (origin/emacs-26) Fix gud-statement for pdb
91a68b5 ; * msdos/INSTALL: Add info about GCC versions.
7ddcc9a Document 'custom-group'
58f9e15 A minor addition to etc/DEBUG
4590414 Avoid errors in ispell.el when Enchant returns empty extra chars
d0d75f9 Make 'ispell-initialize-spellchecker-hook' work again
b90ce66 Handle selected_window change in prepare_menu_bars (Bug#31312)
79ad0b3 ; * INSTALL: Fix Emacs version number. (Bug#31358)
91de88b Fix report-emacs-bug via mailclient on MS-Windows
f4b5ff2 Port collation tests to glibc 2.27
Diffstat (limited to 'lisp/net/browse-url.el')
-rw-r--r-- | lisp/net/browse-url.el | 16 |
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." (error "Browsing URLs is not supported on this system"))) ((eq system-type 'cygwin) (call-process "cygstart" nil nil nil url)) - (t (w32-shell-execute "open" (url-unhex-string url))))) + (t + (w32-shell-execute "open" + ;; w32-shell-execute passes file:// URLs + ;; to APIs that expect file names, so we + ;; need to unhex any %nn encoded + ;; characters in the URL. We don't do + ;; that for other URLs; in particular, + ;; default Windows mail client barfs on + ;; quotes in the MAILTO URLs, so we prefer + ;; to leave the URL with its embedded %nn + ;; encoding intact. + (if (eq t (compare-strings url nil 7 + "file://" nil nil)) + (url-unhex-string url) + url))))) (defun browse-url-default-macosx-browser (url &optional _new-window) "Invoke the macOS system's default Web browser. |