comparison lisp/startup.el @ 22429:38486c386abb

(command-line): Set `temporary-file-directory' based on environment settings, before processing init files.
author Richard M. Stallman <rms@gnu.org>
date Wed, 10 Jun 1998 20:59:16 +0000
parents 979317421863
children 3bd923346a65
comparison
equal deleted inserted replaced
22428:191fa10a366c 22429:38486c386abb
465 (setq submap (cdr submap)))) 465 (setq submap (cdr submap))))
466 (setq define-key-rebound-commands t)) 466 (setq define-key-rebound-commands t))
467 467
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
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")))))
470 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
474 ((or (string= vc "t") 484 ((or (string= vc "t")