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)
(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.