diff options
Diffstat (limited to 'lisp/net')
| -rw-r--r-- | lisp/net/browse-url.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 33f4eda9604..9644a509b22 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -807,15 +807,15 @@ first, if that exists." | |||
| 807 | (interactive (browse-url-interactive-arg "URL: ")) | 807 | (interactive (browse-url-interactive-arg "URL: ")) |
| 808 | (unless (called-interactively-p 'interactive) | 808 | (unless (called-interactively-p 'interactive) |
| 809 | (setq args (or args (list browse-url-new-window-flag)))) | 809 | (setq args (or args (list browse-url-new-window-flag)))) |
| 810 | (when (and url-handler-mode (not (file-name-absolute-p url))) | ||
| 811 | (setq url (expand-file-name url))) | ||
| 810 | (let ((process-environment (copy-sequence process-environment)) | 812 | (let ((process-environment (copy-sequence process-environment)) |
| 811 | (function (or (and (string-match "\\`mailto:" url) | 813 | (function (or (and (string-match "\\`mailto:" url) |
| 812 | browse-url-mailto-function) | 814 | browse-url-mailto-function) |
| 813 | browse-url-browser-function)) | 815 | browse-url-browser-function)) |
| 814 | ;; Ensure that `default-directory' exists and is readable (b#6077). | 816 | ;; Ensure that `default-directory' exists and is readable (b#6077). |
| 815 | (default-directory (if (and (file-directory-p default-directory) | 817 | (default-directory (or (unhandled-file-name-directory default-directory) |
| 816 | (file-readable-p default-directory)) | 818 | (expand-file-name "~/")))) |
| 817 | default-directory | ||
| 818 | (expand-file-name "~/")))) | ||
| 819 | ;; When connected to various displays, be careful to use the display of | 819 | ;; When connected to various displays, be careful to use the display of |
| 820 | ;; the currently selected frame, rather than the original start display, | 820 | ;; the currently selected frame, rather than the original start display, |
| 821 | ;; which may not even exist any more. | 821 | ;; which may not even exist any more. |