# HG changeset patch # User Richard M. Stallman # Date 937510478 0 # Node ID e6246adc8a35606089875fd24a1fbc3fa302a77d # Parent 3d91004572f8f3ebb82ceefd1eeeb3e3dcf56c8f (Vtemporary_file_directory): New variable. (syms_of_filelock): Set up Lisp variable. (get_boot_time): Make the temp name in the proper dir. diff -r 3d91004572f8 -r e6246adc8a35 src/filelock.c --- a/src/filelock.c Thu Sep 16 19:29:30 1999 +0000 +++ b/src/filelock.c Thu Sep 16 19:34:38 1999 +0000 @@ -61,6 +61,10 @@ extern int errno; #endif +/* The directory for writing temporary files. */ + +Lisp_Object Vtemporary_file_directory; + #ifdef CLASH_DETECTION #include @@ -195,7 +199,9 @@ if (! NILP (Ffile_exists_p (tempname))) { Lisp_Object args[6]; - tempname = Fmake_temp_name (build_string ("wtmp")); + tempname = Fexpand_file_name (build_string ("wtmp"), + Vtemporary_file_directory); + tempname = Fmake_temp_name (tempname); args[0] = Vshell_file_name; args[1] = Qnil; args[2] = Qnil; @@ -391,7 +397,7 @@ #ifndef index extern char *rindex (), *index (); #endif - int o, p, len, ret; + int len, ret; int local_owner = 0; char *at, *dot, *colon; char *lfinfo = 0; @@ -720,6 +726,10 @@ void syms_of_filelock () { + DEFVAR_LISP ("temporary-file-directory", &Vtemporary_file_directory, + "The directory for writing temporary files."); + Vtemporary_file_directory = Qnil; + defsubr (&Sunlock_buffer); defsubr (&Slock_buffer); defsubr (&Sfile_locked_p);