From: Karl Heuer Date: Wed, 25 Feb 1998 22:46:28 +0000 (+0000) Subject: (custom-file): New function. X-Git-Tag: emacs-20.3~2100 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=176eb8cb50fee6791c9e41aed504ab35ce79aa6e;p=emacs.git (custom-file): New function. (custom-save-delete): Use it. (custom-save-all): Use it. --- diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index e53459ecee6..aa9b88c0ee5 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2984,11 +2984,19 @@ you need to explicitly load that file for the settings to take effect." :type '(choice (const :tag "Your Emacs init file" nil) file) :group 'customize) +(defun custom-file () + "Return the file name for saving customizations." + (setq custom-file + (or custom-file + user-init-file + (read-file-name "File for customizations: " + "~/" nil nil ".emacs")))) + (defun custom-save-delete (symbol) "Delete the call to SYMBOL from `custom-file'. Leave point at the location of the call, or after the last expression." (let ((default-major-mode)) - (set-buffer (find-file-noselect (or custom-file user-init-file)))) + (set-buffer (find-file-noselect (custom-file)))) (goto-char (point-min)) (catch 'found (while t @@ -3096,7 +3104,7 @@ Leave point at the location of the call, or after the last expression." (custom-save-faces) (save-excursion (let ((default-major-mode nil)) - (set-buffer (find-file-noselect (or custom-file user-init-file)))) + (set-buffer (find-file-noselect (custom-file)))) (save-buffer)))) ;;; The Customize Menu.