aboutsummaryrefslogtreecommitdiffstats
path: root/src/callproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/callproc.c b/src/callproc.c
index ea79da7ff5a..cb11ee0cc53 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1016,8 +1016,26 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r
1016 { 1016 {
1017 USE_SAFE_ALLOCA; 1017 USE_SAFE_ALLOCA;
1018 Lisp_Object pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir); 1018 Lisp_Object pattern = Fexpand_file_name (Vtemp_file_name_pattern, tmpdir);
1019 Lisp_Object encoded_tem = ENCODE_FILE (pattern); 1019 Lisp_Object encoded_tem;
1020 char *tempfile = SAFE_ALLOCA (SBYTES (encoded_tem) + 1); 1020 char *tempfile;
1021
1022#ifdef WINDOWSNT
1023 /* Cannot use the result of Fexpand_file_name, because it
1024 downcases the XXXXXX part of the pattern, and mktemp then
1025 doesn't recognize it. */
1026 if (!NILP (Vw32_downcase_file_names))
1027 {
1028 Lisp_Object dirname = Ffile_name_directory (pattern);
1029
1030 if (NILP (dirname))
1031 pattern = Vtemp_file_name_pattern;
1032 else
1033 pattern = concat2 (dirname, Vtemp_file_name_pattern);
1034 }
1035#endif
1036
1037 encoded_tem = ENCODE_FILE (pattern);
1038 tempfile = SAFE_ALLOCA (SBYTES (encoded_tem) + 1);
1021 memcpy (tempfile, SDATA (encoded_tem), SBYTES (encoded_tem) + 1); 1039 memcpy (tempfile, SDATA (encoded_tem), SBYTES (encoded_tem) + 1);
1022 coding_systems = Qt; 1040 coding_systems = Qt;
1023 1041