From 171a45d9f6ec43ce10e46d9487905aef08022b6a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 2 Sep 1999 12:05:07 +0000 Subject: [PATCH] (shell-command, shell-command-on-region): Use make-temp-name properly. Use small-temporary-file-directory if non-nil, otherwise temporary-file-directory, to generate temporary files. --- lisp/simple.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 456911c6c9a..418dd71ad5d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1099,8 +1099,10 @@ specifies the value of ERROR-BUFFER." (not (or (bufferp output-buffer) (stringp output-buffer)))) (let ((error-file (if error-buffer - (concat (file-name-directory temp-file-name-pattern) - (make-temp-name "scor")) + (make-temp-name + (expand-file-name "scor" + (or small-temporary-file-directory + temporary-file-directory))) nil))) (barf-if-buffer-read-only) (push-mark nil t) @@ -1231,9 +1233,11 @@ specifies the value of ERROR-BUFFER." current-prefix-arg shell-command-default-error-buffer))) (let ((error-file - (if error-buffer - (concat (file-name-directory temp-file-name-pattern) - (make-temp-name "scor")) + (if error-buffer + (make-temp-name + (expand-file-name "scor" + (or small-temporary-file-directory + temporary-file-directory))) nil)) exit-status) (if (or replace -- 2.39.5