aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-03-04 00:21:56 -0800
committerGlenn Morris2011-03-04 00:21:56 -0800
commit9d9827395a41ab7b87755447ca8a9bf4a163e697 (patch)
tree345aa3cc0fb06f10475784fe2117e20489d7557c
parent732795fa270b62ad28e84d492557186dc24f0503 (diff)
downloademacs-9d9827395a41ab7b87755447ca8a9bf4a163e697.tar.gz
emacs-9d9827395a41ab7b87755447ca8a9bf4a163e697.zip
browse-url fix for bug#6077.
* lisp/net/browse-url.el (browse-url): Handle deleted default-directory.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/net/browse-url.el7
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e506705e6e4..c550cd4e852 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12011-03-04 Glenn Morris <rgm@gnu.org> 12011-03-04 Glenn Morris <rgm@gnu.org>
2 2
3 * net/browse-url.el (browse-url):
4 Handle deleted default-directory. (Bug#6077)
5
3 * recentf.el (recentf-include-p): In case of a buggy predicate, 6 * recentf.el (recentf-include-p): In case of a buggy predicate,
4 err on the side of including, not excluding. (Bug#5843) 7 err on the side of including, not excluding. (Bug#5843)
5 8
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 660eb3b968e..24dbfc0c30a 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -798,7 +798,12 @@ first, if that exists."
798 (let ((process-environment (copy-sequence process-environment)) 798 (let ((process-environment (copy-sequence process-environment))
799 (function (or (and (string-match "\\`mailto:" url) 799 (function (or (and (string-match "\\`mailto:" url)
800 browse-url-mailto-function) 800 browse-url-mailto-function)
801 browse-url-browser-function))) 801 browse-url-browser-function))
802 ;; Ensure that `default-directory' exists and is readable (b#6077).
803 (default-directory (if (and (file-directory-p default-directory)
804 (file-readable-p default-directory))
805 default-directory
806 (expand-file-name "~/"))))
802 ;; When connected to various displays, be careful to use the display of 807 ;; When connected to various displays, be careful to use the display of
803 ;; the currently selected frame, rather than the original start display, 808 ;; the currently selected frame, rather than the original start display,
804 ;; which may not even exist any more. 809 ;; which may not even exist any more.