From: Richard M. Stallman Date: Sun, 3 Mar 2002 21:57:59 +0000 (+0000) Subject: (make-auto-save-file-name): Use make-temp-file. X-Git-Tag: ttn-vms-21-2-B4~16360 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=75244a672adc068f9502b910756a1263b281ea12;p=emacs.git (make-auto-save-file-name): Use make-temp-file. --- diff --git a/lisp/files.el b/lisp/files.el index e748b6069ce..f5ab220ba15 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3342,13 +3342,14 @@ See also `auto-save-file-name-p'." (setq buffer-name (replace-match replacement t t buffer-name)) (setq limit (1+ (match-end 0))))) ;; Generate the file name. - (expand-file-name - (format "#%s#%s#" buffer-name (make-temp-name "")) - ;; Try a few alternative directories, to get one we can write it. - (cond - ((file-writable-p default-directory) default-directory) - ((file-writable-p "/var/tmp/") "/var/tmp/") - ("~/")))))) + (make-temp-file + (expand-file-name + (format "#%s#" buffer-name) + ;; Try a few alternative directories, to get one we can write it. + (cond + ((file-writable-p default-directory) default-directory) + ((file-writable-p "/var/tmp/") "/var/tmp/") + ("~/"))))))) (defun auto-save-file-name-p (filename) "Return non-nil if FILENAME can be yielded by `make-auto-save-file-name'.