Mercurial > emacs
diff lisp/cus-edit.el @ 20974:a49aafe4e242
(custom-file): New function.
(custom-save-delete): Use it.
(custom-save-all): Use it.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 25 Feb 1998 22:46:28 +0000 |
parents | 323f33e3e92c |
children | 840699d18eab |
line wrap: on
line diff
--- a/lisp/cus-edit.el Wed Feb 25 22:45:29 1998 +0000 +++ b/lisp/cus-edit.el Wed Feb 25 22:46:28 1998 +0000 @@ -2984,11 +2984,19 @@ :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 @@ (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.