1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-22 05:51:11 -07:00

Fix interaction between url-handler-mode and browse-url

* lisp/net/browse-url.el (browse-url): Don't expand any URLs (like
"man:") that have a scheme when using `url-handler-mode' (bug#37056).
This commit is contained in:
Lars Ingebrigtsen 2019-08-23 06:00:36 +02:00
parent baae65d918
commit a179209678

View file

@ -781,7 +781,9 @@ as ARGS."
(interactive (browse-url-interactive-arg "URL: "))
(unless (called-interactively-p 'interactive)
(setq args (or args (list browse-url-new-window-flag))))
(when (and url-handler-mode (not (file-name-absolute-p url)))
(when (and url-handler-mode
(not (file-name-absolute-p url))
(not (string-match "\\`[a-z]+:" url)))
(setq url (expand-file-name url)))
(let ((process-environment (copy-sequence process-environment))
(function (or (and (string-match "\\`mailto:" url)