mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
(custom-file): New function.
(custom-save-delete): Use it. (custom-save-all): Use it.
This commit is contained in:
parent
a1fee1bc2a
commit
176eb8cb50
1 changed files with 10 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue