aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/cus-edit.el12
1 files changed, 10 insertions, 2 deletions
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."
2984 :type '(choice (const :tag "Your Emacs init file" nil) file) 2984 :type '(choice (const :tag "Your Emacs init file" nil) file)
2985 :group 'customize) 2985 :group 'customize)
2986 2986
2987(defun custom-file ()
2988 "Return the file name for saving customizations."
2989 (setq custom-file
2990 (or custom-file
2991 user-init-file
2992 (read-file-name "File for customizations: "
2993 "~/" nil nil ".emacs"))))
2994
2987(defun custom-save-delete (symbol) 2995(defun custom-save-delete (symbol)
2988 "Delete the call to SYMBOL from `custom-file'. 2996 "Delete the call to SYMBOL from `custom-file'.
2989Leave point at the location of the call, or after the last expression." 2997Leave point at the location of the call, or after the last expression."
2990 (let ((default-major-mode)) 2998 (let ((default-major-mode))
2991 (set-buffer (find-file-noselect (or custom-file user-init-file)))) 2999 (set-buffer (find-file-noselect (custom-file))))
2992 (goto-char (point-min)) 3000 (goto-char (point-min))
2993 (catch 'found 3001 (catch 'found
2994 (while t 3002 (while t
@@ -3096,7 +3104,7 @@ Leave point at the location of the call, or after the last expression."
3096 (custom-save-faces) 3104 (custom-save-faces)
3097 (save-excursion 3105 (save-excursion
3098 (let ((default-major-mode nil)) 3106 (let ((default-major-mode nil))
3099 (set-buffer (find-file-noselect (or custom-file user-init-file)))) 3107 (set-buffer (find-file-noselect (custom-file))))
3100 (save-buffer)))) 3108 (save-buffer))))
3101 3109
3102;;; The Customize Menu. 3110;;; The Customize Menu.