aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>1999-09-02 12:05:07 +0000
committerEli Zaretskii <[email protected]>1999-09-02 12:05:07 +0000
commit171a45d9f6ec43ce10e46d9487905aef08022b6a (patch)
treeb0ed5e367e0924bbe0a8bedda2873908fe7fdee4 /lisp/simple.el
parentb046ee9f70ed6b5b21073654da48b243c4bfeaa6 (diff)
(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.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 456911c6c9..418dd71ad5 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