]> git.eshelyaron.com Git - emacs.git/commitdiff
(url-cookie-write-file): Create parent dir.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 21 Dec 2005 20:08:49 +0000 (20:08 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 21 Dec 2005 20:08:49 +0000 (20:08 +0000)
lisp/url/ChangeLog
lisp/url/url-cookie.el

index 81ba66736b04ca5311f021f8f59198c3a25d8567..9abb65d389df11caf26d6c987010ec7037150e47 100644 (file)
@@ -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.
index 480a16c204de1fe47f71afa4f1e54d1b5c72f40e..3772846607a86c242631c5659b36d7468cb19871 100644 (file)
@@ -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"