]> git.eshelyaron.com Git - emacs.git/commitdiff
(custom-file): Don't assume we were invoked with -q unless ~/.emacs exists.
authorEli Zaretskii <eliz@gnu.org>
Sun, 27 May 2001 10:38:51 +0000 (10:38 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 27 May 2001 10:38:51 +0000 (10:38 +0000)
lisp/ChangeLog
lisp/cus-edit.el

index 7d513375741d205025a7ede905a93a29412bae3b..11cbd4f8ed7b9c0211a39ea7a09340d71b2bdfd0 100644 (file)
@@ -1,5 +1,8 @@
 2001-05-27  Eli Zaretskii  <eliz@is.elta.co.il>
 
+       * cus-edit.el (custom-file): Don't assume we were invoked with -q
+       unless ~/.emacs exists.
+
        * novice.el (enable-command): If user-init-file is nil or does not
        exist, default to "~/.emacs" (~/_emacs on DOS and, maybe, Windows).
 
index e3e1421db4fad0ec368b69541b8cee475ff15fb4..b36414d3ac6a9ec6f176c077e9582df657899835 100644 (file)
@@ -3447,7 +3447,10 @@ to the new custom file.  This will preserve your existing customizations."
 
 (defun custom-file ()
   "Return the file name for saving customizations."
-  (if (null user-init-file)
+  (if (and (null user-init-file)
+          (or (file-exists-p "~/.emacs")
+              (and (memq system-type '(ms-dos 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.