changeset 13912:07d5e992fdc4

(auto-save-list-file-prefix): Under MS-DOS, use `.s-'. (normal-top-level): Under MS-DOS, use `make-temp-name' to produce a unique `auto-save-list-file-name' (PID is not unique enough). (command-line-1): Delete explicit test for msdos and windowsnt; test just `window-system'. (command-line-x-option-alist): Use x-handle-geometry for geometry options.
author Richard M. Stallman <rms@gnu.org>
date Mon, 01 Jan 1996 23:50:19 +0000
parents 3e9e8b468bc1
children 4e4201bcea5d
files lisp/startup.el
diffstat 1 files changed, 17 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/startup.el	Mon Jan 01 23:47:49 1996 +0000
+++ b/lisp/startup.el	Mon Jan 01 23:50:19 1996 +0000
@@ -172,8 +172,8 @@
     ("-fn" 1 x-handle-switch font)
     ("-font" 1 x-handle-switch font)
     ("-ib" 1 x-handle-numeric-switch internal-border-width)
-    ("-g" 1 x-handle-switch geometry)
-    ("-geometry" 1 x-handle-switch geometry)
+    ("-g" 1 x-handle-geometry)
+    ("-geometry" 1 x-handle-geometry)
     ("-fg" 1 x-handle-switch foreground-color)
     ("-foreground" 1 x-handle-switch foreground-color)
     ("-bg" 1 x-handle-switch background-color)
@@ -194,7 +194,7 @@
     ("--reverse-video" 0 x-handle-switch reverse t)
     ("--font" 1 x-handle-switch font)
     ("--internal-border" 1 x-handle-numeric-switch internal-border-width)
-    ("--geometry" 1 x-handle-switch geometry)
+    ("--geometry" 1 x-handle-geometry)
     ("--foreground-color" 1 x-handle-switch foreground-color)
     ("--background-color" 1 x-handle-switch background-color)
     ("--mouse-color" 1 x-handle-switch mouse-color)
@@ -284,7 +284,10 @@
 This is initialized based on `mail-host-address',
 after your init file is read, in case it sets `mail-host-address'.")
 
-(defvar auto-save-list-file-prefix "~/.saves-"
+(defvar auto-save-list-file-prefix
+  (if (eq system-type 'ms-dos)
+      "~/_s"  ; MS-DOS cannot have initial dot, and allows only 8.3 names
+    "~/.saves-")
   "Prefix for generating `auto-save-list-file-name'.
 This is used after reading your `.emacs' file to initialize
 `auto-save-list-file-name', by appending Emacs's pid and the system name,
@@ -347,11 +350,15 @@
 	(or auto-save-list-file-name
 	    (and auto-save-list-file-prefix
 		 (setq auto-save-list-file-name
-		       (expand-file-name
-			(format "%s%d-%s"
-				auto-save-list-file-prefix
-				(emacs-pid)
-				(system-name))))))
+		       ;; Under MS-DOS our PID is almost always reused between
+		       ;; Emacs invocations.  We need something more unique.
+		       (if (eq system-type 'ms-dos)
+			   (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)))))))
 	(run-hooks 'emacs-startup-hook)
 	(and term-setup-hook
 	     (run-hooks 'term-setup-hook))
@@ -716,8 +723,7 @@
 
 		   ;; Windows and MSDOS (currently) do not count as
 		   ;; window systems, but do have mouse support.
-		   (if (or (memq system-type '(msdos windowsnt))
-			   window-system)
+		   (if window-system
 		       (insert "\n
 C-mouse-3 (third mouse button, with Control) gets a mode-specific menu."))
 		   (if (directory-files (file-name-directory auto-save-list-file-prefix)