summaryrefslogtreecommitdiff
path: root/lisp/net/browse-url.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2014-05-13 10:54:08 +0200
committerMichael Albinus <michael.albinus@gmx.de>2014-05-13 10:54:08 +0200
commite95b937a425af518f97837c5d9b41a8b2e8c0e58 (patch)
tree1cbfc67c4d5f0526c32d3a92fdf3cc8ce667906a /lisp/net/browse-url.el
parent636ae7c2624af8a5c46c8e6fac17fcb42e0495f1 (diff)
downloademacs-e95b937a425af518f97837c5d9b41a8b2e8c0e58.tar.gz
* net/browse-url.el (browse-url):
Use `unhandled-file-name-directory' when setting `default-directory', in order to circumvent stalled remote connections. Fixes: debbugs:17425
Diffstat (limited to 'lisp/net/browse-url.el')
-rw-r--r--lisp/net/browse-url.el8
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."
(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)))
+ (setq url (expand-file-name url)))
(let ((process-environment (copy-sequence process-environment))
(function (or (and (string-match "\\`mailto:" url)
browse-url-mailto-function)
browse-url-browser-function))
;; Ensure that `default-directory' exists and is readable (b#6077).
- (default-directory (if (and (file-directory-p default-directory)
- (file-readable-p default-directory))
- default-directory
- (expand-file-name "~/"))))
+ (default-directory (or (unhandled-file-name-directory default-directory)
+ (expand-file-name "~/"))))
;; When connected to various displays, be careful to use the display of
;; the currently selected frame, rather than the original start display,
;; which may not even exist any more.