Commit 9d982739 authored by Glenn Morris's avatar Glenn Morris
Browse files

browse-url fix for bug#6077.

* lisp/net/browse-url.el (browse-url): Handle deleted default-directory.
parent 732795fa
2011-03-04 Glenn Morris <rgm@gnu.org>
 
* net/browse-url.el (browse-url):
Handle deleted default-directory. (Bug#6077)
* recentf.el (recentf-include-p): In case of a buggy predicate,
err on the side of including, not excluding. (Bug#5843)
 
......
......@@ -798,7 +798,12 @@ first, if that exists."
(let ((process-environment (copy-sequence process-environment))
(function (or (and (string-match "\\`mailto:" url)
browse-url-mailto-function)
browse-url-browser-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 "~/"))))
;; 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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment