changeset 28777:313dc33f94b9

(auto-save-list-file-prefix): For ms-dos, set the default prefix to `~/_emacs.d/auto-save.list/_s'. (normal-top-level): Create the directory for auto-save files, if it doesn't already exist, in the ms-dos case only.
author Eli Zaretskii <eliz@gnu.org>
date Tue, 02 May 2000 12:02:17 +0000
parents 49a91eb4274c
children 2103b8319ef4
files lisp/startup.el
diffstat 1 files changed, 18 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/startup.el	Tue May 02 12:00:46 2000 +0000
+++ b/lisp/startup.el	Tue May 02 12:02:17 2000 +0000
@@ -319,7 +319,7 @@
 (defcustom auto-save-list-file-prefix
   (cond ((eq system-type 'ms-dos)
 	 ;; MS-DOS cannot have initial dot, and allows only 8.3 names
-	 "~/_s")
+	 "~/_emacs.d/auto-save.list/_s")
 	(t
 	 "~/.emacs.d/auto-save-list/.saves-"))
   "Prefix for generating `auto-save-list-file-name'.
@@ -444,16 +444,23 @@
 		 (setq auto-save-list-file-name
 		       ;; Under MS-DOS our PID is almost always reused between
 		       ;; Emacs invocations.  We need something more unique.
-		       (if (eq system-type 'ms-dos)
-			   (concat 
-			    (make-temp-name
-			     (expand-file-name auto-save-list-file-prefix))
-			    "~")
-
-			 (expand-file-name (format "%s%d-%s~"
-						   auto-save-list-file-prefix
-						   (emacs-pid)
-						   (system-name)))))))
+		       (cond ((eq system-type 'ms-dos)
+			      ;; We are going to access the auto-save
+			      ;; directory, so make sure it exists.
+			      (make-directory
+			       (file-name-directory auto-save-list-file-prefix)
+			       t)
+			      (concat 
+			       (make-temp-name
+				(expand-file-name
+				 auto-save-list-file-prefix))
+			       "~"))
+			     (t
+			      (expand-file-name
+			       (format "%s%d-%s~"
+				       auto-save-list-file-prefix
+				       (emacs-pid)
+				       (system-name))))))))
 	(run-hooks 'emacs-startup-hook)
 	(and term-setup-hook
 	     (run-hooks 'term-setup-hook))