aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-06-10 20:59:16 +0000
committerRichard M. Stallman1998-06-10 20:59:16 +0000
commit849eedba17e4ac5f287017a7a3a42db950c854b3 (patch)
tree5edf712b7cda8fad393e0a2fbee3636e75d87f9a
parent2e454bf23e17b1a85a0b5abcdddc5d6162781b0a (diff)
downloademacs-849eedba17e4ac5f287017a7a3a42db950c854b3.tar.gz
emacs-849eedba17e4ac5f287017a7a3a42db950c854b3.zip
(command-line): Set `temporary-file-directory' based
on environment settings, before processing init files.
-rw-r--r--lisp/startup.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 55a05fb6083..07c6c241f32 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -468,6 +468,16 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
468(defun command-line () 468(defun command-line ()
469 (setq command-line-default-directory default-directory) 469 (setq command-line-default-directory default-directory)
470 470
471 ;; Choose a reasonable location for temporary files.
472 (setq temporary-file-directory
473 (file-name-as-directory
474 (cond ((memq system-type '(ms-dos windows-nt))
475 (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp"))
476 ((memq system-type '(vax-vms axp-vms))
477 (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "SYS$SCRATCH:"))
478 (t
479 (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))))
480
471 ;; See if we should import version-control from the environment variable. 481 ;; See if we should import version-control from the environment variable.
472 (let ((vc (getenv "VERSION_CONTROL"))) 482 (let ((vc (getenv "VERSION_CONTROL")))
473 (cond ((eq vc nil)) ;don't do anything if not set 483 (cond ((eq vc nil)) ;don't do anything if not set