[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: customize -> save for future disrespects symlinks
From: |
Richard Stallman |
Subject: |
Re: customize -> save for future disrespects symlinks |
Date: |
Sat, 07 May 2005 14:36:11 -0400 |
Does this replacement function make it work better?
(This is from the development sources and I don't know
if it works in Emacs 21. But the crucial change is adding
the call to file-chase-links.)
(defun custom-file ()
"Return the file name for saving customizations."
(file-chase-links
(or custom-file
(let ((user-init-file user-init-file)
(default-init-file
(if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs")))
(when (null user-init-file)
(if (or (file-exists-p default-init-file)
(and (eq system-type 'windows-nt)
(file-exists-p "~/_emacs")))
;; Started with -q, i.e. the file containing
;; Custom settings hasn't been read. Saving
;; settings there would overwrite other settings.
(error "Saving settings from \"emacs -q\" would overwrite
existing customizations"))
(setq user-init-file default-init-file))
user-init-file))))