Mercurial > hg > xemacs-beta
diff lisp/cus-edit.el @ 4382:12ff8dc2b57e
Create the containing directory for the custom and init files if necessary.
2008-01-03 Aidan Kehoe <kehoea@parhasard.net>
* cus-edit.el (custom-save-all):
If the directory containing the custom file doesn't exist, try to
create it. Fixes Nick's Crabtree's bug of
5fb265820712140145w512fa3bbh355cf76f7e2cf792@mail.gmail.com ;
thank you Nick.
* menubar-items.el (default-menubar):
In the code to edit the user's init file, try to create the
containing directory if it doesn't exist.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 03 Jan 2008 12:45:44 +0100 |
parents | 20accccbebd6 |
children | 7f3d065a56a1 |
line wrap: on
line diff
--- a/lisp/cus-edit.el Thu Jan 03 01:33:59 2008 -0800 +++ b/lisp/cus-edit.el Thu Jan 03 12:45:44 2008 +0100 @@ -3766,7 +3766,13 @@ (custom-save-variables) (custom-save-faces) (let ((find-file-hooks nil) - (auto-mode-alist)) + (auto-mode-alist) + custom-file-directory) + (unless (file-directory-p (setq custom-file-directory + (file-name-directory custom-file))) + (message "Creating %s... " custom-file-directory) + (make-directory custom-file-directory t) + (message "Creating %s... done." custom-file-directory)) (with-current-buffer (find-file-noselect custom-file) (save-buffer)))))