diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2005-12-21 20:08:49 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2005-12-21 20:08:49 +0000 |
commit | 32fa584479d717ce8ea65abe39c3da3da04fa62e (patch) | |
tree | 9ac608b0dd893590edf2946cdd14e2c9970fc4e6 /lisp/url | |
parent | 208d45772d458f8ab025663040cbd5f34f4ff54d (diff) | |
download | emacs-32fa584479d717ce8ea65abe39c3da3da04fa62e.tar.gz |
(url-cookie-write-file): Create parent dir.
Diffstat (limited to 'lisp/url')
-rw-r--r-- | lisp/url/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/url/url-cookie.el | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 81ba66736b0..9abb65d389d 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,9 @@ +2005-12-21 Stefan Monnier <monnier@iro.umontreal.ca> + + * url-cookie.el (url-cookie-write-file): Create parent dir. + + * url.el (url-configuration-directory): Use ~/.emacs.d if possible. + 2005-12-07 Klaus Straubinger <KSNetz@Arcor.DE> (tiny change) * url-cookie.el (url-cookie-save-interval): Simplify. diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 480a16c204d..3772846607a 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -148,6 +148,8 @@ telling Microsoft that." ;;;###autoload (defun url-cookie-write-file (&optional fname) (setq fname (or fname url-cookie-file)) + (unless (file-directory-p (file-name-directory fname)) + (ignore-errors (make-directory (file-name-directory fname)))) (cond ((not url-cookies-changed-since-last-save) nil) ((not (file-writable-p fname)) @@ -155,8 +157,7 @@ telling Microsoft that." (t (url-cookie-clean-up) (url-cookie-clean-up t) - (save-excursion - (set-buffer (get-buffer-create " *cookies*")) + (with-current-buffer (get-buffer-create " *cookies*") (erase-buffer) (fundamental-mode) (insert ";; Emacs-W3 HTTP cookies file\n" |