diff options
| author | Richard M. Stallman | 1996-12-07 21:10:03 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-12-07 21:10:03 +0000 |
| commit | 8abd035b441792eafa46e3b40e9b0bb1f305dab9 (patch) | |
| tree | 20d1664af4c7c06a5c042f7ee3145c9e4da9a4d3 /src | |
| parent | b336ddd38a38f7f94c33509b5aa7574446bc2e19 (diff) | |
| download | emacs-8abd035b441792eafa46e3b40e9b0bb1f305dab9.tar.gz emacs-8abd035b441792eafa46e3b40e9b0bb1f305dab9.zip | |
(Vtemp_file_name_pattern): New variable.
Diffstat (limited to 'src')
| -rw-r--r-- | src/callproc.c | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/src/callproc.c b/src/callproc.c index a5ca75f726e..c76c1fd2bcb 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -95,6 +95,7 @@ Lisp_Object Vbinary_process_output; | |||
| 95 | 95 | ||
| 96 | Lisp_Object Vexec_path, Vexec_directory, Vdata_directory, Vdoc_directory; | 96 | Lisp_Object Vexec_path, Vexec_directory, Vdata_directory, Vdoc_directory; |
| 97 | Lisp_Object Vconfigure_info_directory; | 97 | Lisp_Object Vconfigure_info_directory; |
| 98 | Lisp_Object Vtemp_file_name_pattern; | ||
| 98 | 99 | ||
| 99 | Lisp_Object Vshell_file_name; | 100 | Lisp_Object Vshell_file_name; |
| 100 | 101 | ||
| @@ -634,11 +635,6 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 634 | register Lisp_Object start, end; | 635 | register Lisp_Object start, end; |
| 635 | #ifdef DOS_NT | 636 | #ifdef DOS_NT |
| 636 | char *tempfile; | 637 | char *tempfile; |
| 637 | #else | ||
| 638 | char tempfile[20]; | ||
| 639 | #endif | ||
| 640 | int count = specpdl_ptr - specpdl; | ||
| 641 | #ifdef DOS_NT | ||
| 642 | char *outf = '\0'; | 638 | char *outf = '\0'; |
| 643 | 639 | ||
| 644 | if ((outf = egetenv ("TMP")) || (outf = egetenv ("TEMP"))) | 640 | if ((outf = egetenv ("TMP")) || (outf = egetenv ("TEMP"))) |
| @@ -660,12 +656,9 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") | |||
| 660 | strcat (tempfile, "detmp.XXX"); | 656 | strcat (tempfile, "detmp.XXX"); |
| 661 | #endif | 657 | #endif |
| 662 | #else /* not DOS_NT */ | 658 | #else /* not DOS_NT */ |
| 663 | 659 | char *tempfile = (char *) alloca (XSTRING (Vtemp_file_name_pattern)->size + 1); | |
| 664 | #ifdef VMS | 660 | bcopy (XSTRING (Vtemp_file_name_pattern)->data, tempfile, |
| 665 | strcpy (tempfile, "tmp:emacsXXXXXX."); | 661 | XSTRING (Vtemp_file_name_pattern)->size + 1); |
| 666 | #else | ||
| 667 | strcpy (tempfile, "/tmp/emacsXXXXXX"); | ||
| 668 | #endif | ||
| 669 | #endif /* not DOS_NT */ | 662 | #endif /* not DOS_NT */ |
| 670 | 663 | ||
| 671 | mktemp (tempfile); | 664 | mktemp (tempfile); |
| @@ -1097,6 +1090,20 @@ init_callproc () | |||
| 1097 | sh = (char *) getenv ("SHELL"); | 1090 | sh = (char *) getenv ("SHELL"); |
| 1098 | Vshell_file_name = build_string (sh ? sh : "/bin/sh"); | 1091 | Vshell_file_name = build_string (sh ? sh : "/bin/sh"); |
| 1099 | #endif | 1092 | #endif |
| 1093 | |||
| 1094 | #ifdef VMS | ||
| 1095 | Vtemp_file_name_pattern = build_string ("tmp:emacsXXXXXX."); | ||
| 1096 | #else | ||
| 1097 | if (getenv ("TMPDIR")) | ||
| 1098 | { | ||
| 1099 | char *dir = getenv ("TMPDIR"); | ||
| 1100 | Vtemp_file_name_pattern | ||
| 1101 | = Fexpand_file_name (build_string ("emacsXXXXXX"), | ||
| 1102 | build_string (dir)); | ||
| 1103 | } | ||
| 1104 | else | ||
| 1105 | Vtemp_file_name_pattern = build_string ("/tmp/emacsXXXXXX"); | ||
| 1106 | #endif | ||
| 1100 | } | 1107 | } |
| 1101 | 1108 | ||
| 1102 | set_process_environment () | 1109 | set_process_environment () |
| @@ -1154,6 +1161,12 @@ Emacs's info files; the default value for Info-default-directory-list\n\ | |||
| 1154 | includes this."); | 1161 | includes this."); |
| 1155 | Vconfigure_info_directory = build_string (PATH_INFO); | 1162 | Vconfigure_info_directory = build_string (PATH_INFO); |
| 1156 | 1163 | ||
| 1164 | DEFVAR_LISP ("temp-file-name-pattern", &Vtemp_file_name_pattern, | ||
| 1165 | "Pattern for making names for temporary files.\n\ | ||
| 1166 | This is used by `call-process-region'."); | ||
| 1167 | /* The real initialization is when we start again. */ | ||
| 1168 | Vtemp_file_name_pattern = Qnil; | ||
| 1169 | |||
| 1157 | DEFVAR_LISP ("process-environment", &Vprocess_environment, | 1170 | DEFVAR_LISP ("process-environment", &Vprocess_environment, |
| 1158 | "List of environment variables for subprocesses to inherit.\n\ | 1171 | "List of environment variables for subprocesses to inherit.\n\ |
| 1159 | Each element should be a string of the form ENVVARNAME=VALUE.\n\ | 1172 | Each element should be a string of the form ENVVARNAME=VALUE.\n\ |