]> git.eshelyaron.com Git - emacs.git/commitdiff
(shell-command, shell-command-on-region): Use
authorEli Zaretskii <eliz@gnu.org>
Thu, 2 Sep 1999 12:05:07 +0000 (12:05 +0000)
committerEli Zaretskii <eliz@gnu.org>
Thu, 2 Sep 1999 12:05:07 +0000 (12:05 +0000)
make-temp-name properly.  Use small-temporary-file-directory if
non-nil, otherwise temporary-file-directory, to generate temporary
files.

lisp/simple.el

index 456911c6c9ad6134188e4089e1546cc68faa6e5f..418dd71ad5dfc9e3d66cdfb0622afa177d0d893c 100644 (file)
@@ -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