# HG changeset patch # User Richard M. Stallman # Date 897512356 0 # Node ID 38486c386abbfb8859c7c0d200f3da195acaa151 # Parent 191fa10a366ca57425fce5cf59be53c269c3384a (command-line): Set `temporary-file-directory' based on environment settings, before processing init files. diff -r 191fa10a366c -r 38486c386abb lisp/startup.el --- a/lisp/startup.el Wed Jun 10 20:57:59 1998 +0000 +++ b/lisp/startup.el Wed Jun 10 20:59:16 1998 +0000 @@ -468,6 +468,16 @@ (defun command-line () (setq command-line-default-directory default-directory) + ;; Choose a reasonable location for temporary files. + (setq temporary-file-directory + (file-name-as-directory + (cond ((memq system-type '(ms-dos windows-nt)) + (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) + ((memq system-type '(vax-vms axp-vms)) + (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "SYS$SCRATCH:")) + (t + (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp"))))) + ;; See if we should import version-control from the environment variable. (let ((vc (getenv "VERSION_CONTROL"))) (cond ((eq vc nil)) ;don't do anything if not set