Mercurial > emacs
comparison lisp/simple.el @ 25483:cd1649a27c08
(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.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Thu, 02 Sep 1999 12:05:07 +0000 |
parents | c75839c09c84 |
children | af3e44ec3b8c |
comparison
equal
deleted
inserted
replaced
25482:f1d437596538 | 25483:cd1649a27c08 |
---|---|
1097 (funcall handler 'shell-command command output-buffer error-buffer) | 1097 (funcall handler 'shell-command command output-buffer error-buffer) |
1098 (if (and output-buffer | 1098 (if (and output-buffer |
1099 (not (or (bufferp output-buffer) (stringp output-buffer)))) | 1099 (not (or (bufferp output-buffer) (stringp output-buffer)))) |
1100 (let ((error-file | 1100 (let ((error-file |
1101 (if error-buffer | 1101 (if error-buffer |
1102 (concat (file-name-directory temp-file-name-pattern) | 1102 (make-temp-name |
1103 (make-temp-name "scor")) | 1103 (expand-file-name "scor" |
1104 (or small-temporary-file-directory | |
1105 temporary-file-directory))) | |
1104 nil))) | 1106 nil))) |
1105 (barf-if-buffer-read-only) | 1107 (barf-if-buffer-read-only) |
1106 (push-mark nil t) | 1108 (push-mark nil t) |
1107 ;; We do not use -f for csh; we will not support broken use of | 1109 ;; We do not use -f for csh; we will not support broken use of |
1108 ;; .cshrcs. Even the BSD csh manual says to use | 1110 ;; .cshrcs. Even the BSD csh manual says to use |
1229 string | 1231 string |
1230 current-prefix-arg | 1232 current-prefix-arg |
1231 current-prefix-arg | 1233 current-prefix-arg |
1232 shell-command-default-error-buffer))) | 1234 shell-command-default-error-buffer))) |
1233 (let ((error-file | 1235 (let ((error-file |
1234 (if error-buffer | 1236 (if error-buffer |
1235 (concat (file-name-directory temp-file-name-pattern) | 1237 (make-temp-name |
1236 (make-temp-name "scor")) | 1238 (expand-file-name "scor" |
1239 (or small-temporary-file-directory | |
1240 temporary-file-directory))) | |
1237 nil)) | 1241 nil)) |
1238 exit-status) | 1242 exit-status) |
1239 (if (or replace | 1243 (if (or replace |
1240 (and output-buffer | 1244 (and output-buffer |
1241 (not (or (bufferp output-buffer) (stringp output-buffer))))) | 1245 (not (or (bufferp output-buffer) (stringp output-buffer))))) |