changeset 4399:e5b3c4dbc8a2

Call #'make-temp-file in mule-tests.el, now it's available. 2008-01-16 Aidan Kehoe <kehoea@parhasard.net> * automated/mule-tests.el (test-file-name): Call #'make-temp-file now it's available. Remove a long comment saying, essentially, that it should be used, not #'make-temp-name.
author Aidan Kehoe <kehoea@parhasard.net>
date Wed, 16 Jan 2008 15:43:01 +0100
parents 479443c0f95a
children 555e21a66d51 01970033faa6
files tests/ChangeLog tests/automated/mule-tests.el
diffstat 2 files changed, 9 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/tests/ChangeLog	Wed Jan 16 15:20:51 2008 +0100
+++ b/tests/ChangeLog	Wed Jan 16 15:43:01 2008 +0100
@@ -1,3 +1,10 @@
+2008-01-16  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* automated/mule-tests.el (test-file-name): 
+	Call #'make-temp-file now it's available. Remove a long comment
+	saying, essentially, that it should be used, not
+	#'make-temp-name. 
+
 2008-01-16  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* automated/hash-table-tests.el: 
--- a/tests/automated/mule-tests.el	Wed Jan 16 15:20:51 2008 +0100
+++ b/tests/automated/mule-tests.el	Wed Jan 16 15:43:01 2008 +0100
@@ -118,21 +118,8 @@
 ;; Fixed 2007-06-22 <18043.2793.611745.734215@parhasard.net>.
 ;;----------------------------------------------------------------
 
-(let ((test-file-name
-       ;; The Gnus people, when they call #'make-temp-name, then loop,
-       ;; checking if the corresponding file exists. Our #'make-temp-name
-       ;; already does this loop, and the Gnus approach doesn't bring
-       ;; anything; there remains a race condition if you can predict the
-       ;; path name. The path name in question depends on the process ID and
-       ;; a (weak) PRNG seeded with the seconds to the power of the
-       ;; milliseconds of some instant close to the startup time of this
-       ;; XEmacs; without being able to read the address space of this
-       ;; XEmacs, or monitor what stat() calls it does, it is not predictable.
-       ;;
-       ;; The really kosher way to do this is to merge GNU's make-temp-file
-       ;; and use that. It basically has the functionality of the Unix
-       ;; mkstemp.
-       (make-temp-name (expand-file-name "tXfXsKc" (temp-directory))))
+(let ((test-file-name 
+       (make-temp-file (expand-file-name "tXfXsKc" (temp-directory))))
       revert-buffer-function
       kill-buffer-hook)		; paranoia
   (find-file test-file-name)