Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
4381:3906442b491b | 4382:12ff8dc2b57e |
---|---|
3764 "Cannot save customizations; init file was not fully loaded")) | 3764 "Cannot save customizations; init file was not fully loaded")) |
3765 (let ((inhibit-read-only t)) | 3765 (let ((inhibit-read-only t)) |
3766 (custom-save-variables) | 3766 (custom-save-variables) |
3767 (custom-save-faces) | 3767 (custom-save-faces) |
3768 (let ((find-file-hooks nil) | 3768 (let ((find-file-hooks nil) |
3769 (auto-mode-alist)) | 3769 (auto-mode-alist) |
3770 custom-file-directory) | |
3771 (unless (file-directory-p (setq custom-file-directory | |
3772 (file-name-directory custom-file))) | |
3773 (message "Creating %s... " custom-file-directory) | |
3774 (make-directory custom-file-directory t) | |
3775 (message "Creating %s... done." custom-file-directory)) | |
3770 (with-current-buffer (find-file-noselect custom-file) | 3776 (with-current-buffer (find-file-noselect custom-file) |
3771 (save-buffer))))) | 3777 (save-buffer))))) |
3772 | 3778 |
3773 | 3779 |
3774 ;;; The Customize Menu. | 3780 ;;; The Customize Menu. |