]> git.eshelyaron.com Git - emacs.git/commitdiff
(custom-file): New function.
authorKarl Heuer <kwzh@gnu.org>
Wed, 25 Feb 1998 22:46:28 +0000 (22:46 +0000)
committerKarl Heuer <kwzh@gnu.org>
Wed, 25 Feb 1998 22:46:28 +0000 (22:46 +0000)
(custom-save-delete): Use it.
(custom-save-all): Use it.

lisp/cus-edit.el

index e53459ecee6f7d97cd0b9bcfe708e88551c12e39..aa9b88c0ee593815538e4e1998098d57b4fa51ea 100644 (file)
@@ -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.