diff lisp/gnus/nnmail.el @ 26039:fb6b9c37cdc4

Use make-temp-file.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 15 Oct 1999 16:03:59 +0000
parents 5e026e6efc73
children 9968f55ad26e
line wrap: on
line diff
--- a/lisp/gnus/nnmail.el	Fri Oct 15 15:48:53 1999 +0000
+++ b/lisp/gnus/nnmail.el	Fri Oct 15 16:03:59 1999 +0000
@@ -1238,13 +1238,6 @@
 
 ;;; Utility functions
 
-(defun nnmail-make-complex-temp-name (prefix)
-  (let ((newname (make-temp-name prefix))
-	(newprefix prefix))
-    (while (file-exists-p newname)
-      (setq newprefix (concat newprefix "x"))
-      (setq newname (make-temp-name newprefix)))
-    newname))
 
 ;; Written by Per Abrahamsen <amanda@iesd.auc.dk>.
 
@@ -1623,8 +1616,7 @@
 	     nnmail-crash-box (intern (format "%s-save-mail" method))
 	     spool-func group (intern (format "%s-active-number" method)))
 	    ;; Check whether the inbox is to be moved to the special tmp dir.
-	    (setq incoming
-		  (nnmail-make-complex-temp-name
+	    (let ((prefix
 		   (expand-file-name
 		    (if nnmail-tmp-directory
 			(concat
@@ -1632,8 +1624,9 @@
 			 (file-name-nondirectory
 			  (concat (file-name-as-directory temp) "Incoming")))
 		      (concat (file-name-as-directory temp) "Incoming")))))
-	    (unless (file-exists-p (file-name-directory incoming))
-	      (make-directory (file-name-directory incoming) t))
+	      (unless (file-exists-p (file-name-directory prefix))
+		(make-directory (file-name-directory prefix) t))
+	      (setq incoming (make-temp-file prefix)))
 	    (rename-file nnmail-crash-box incoming t)
 	    (push incoming incomings))))
       ;; If we did indeed read any incoming spools, we save all info.