aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-05-10 09:09:58 +0000
committerRichard M. Stallman2005-05-10 09:09:58 +0000
commit541044b0e19f365cdb882d7d68bbf9acf37a37e8 (patch)
tree433adeddb391e69253ce6cfb5ae05d69b394a0c9
parentcc45837e571e9dd9845f1e00ab56893d8dde7dd5 (diff)
downloademacs-541044b0e19f365cdb882d7d68bbf9acf37a37e8.tar.gz
emacs-541044b0e19f365cdb882d7d68bbf9acf37a37e8.zip
(custom-file): Call file-chase-links.
-rw-r--r--lisp/cus-edit.el29
1 files changed, 15 insertions, 14 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 93b310fdb17..50c9accb9ce 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -3835,20 +3835,21 @@ if only the first line of the docstring is shown."))
3835 3835
3836(defun custom-file () 3836(defun custom-file ()
3837 "Return the file name for saving customizations." 3837 "Return the file name for saving customizations."
3838 (or custom-file 3838 (file-chase-links
3839 (let ((user-init-file user-init-file) 3839 (or custom-file
3840 (default-init-file 3840 (let ((user-init-file user-init-file)
3841 (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs"))) 3841 (default-init-file
3842 (when (null user-init-file) 3842 (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs")))
3843 (if (or (file-exists-p default-init-file) 3843 (when (null user-init-file)
3844 (and (eq system-type 'windows-nt) 3844 (if (or (file-exists-p default-init-file)
3845 (file-exists-p "~/_emacs"))) 3845 (and (eq system-type 'windows-nt)
3846 ;; Started with -q, i.e. the file containing 3846 (file-exists-p "~/_emacs")))
3847 ;; Custom settings hasn't been read. Saving 3847 ;; Started with -q, i.e. the file containing
3848 ;; settings there would overwrite other settings. 3848 ;; Custom settings hasn't been read. Saving
3849 (error "Saving settings from \"emacs -q\" would overwrite existing customizations")) 3849 ;; settings there would overwrite other settings.
3850 (setq user-init-file default-init-file)) 3850 (error "Saving settings from \"emacs -q\" would overwrite existing customizations"))
3851 user-init-file))) 3851 (setq user-init-file default-init-file))
3852 user-init-file))))
3852 3853
3853(defun custom-save-delete (symbol) 3854(defun custom-save-delete (symbol)
3854 "Visit `custom-file' and delete all calls to SYMBOL from it. 3855 "Visit `custom-file' and delete all calls to SYMBOL from it.