Mercurial > emacs
changeset 43681:5f02f10efd8a
(make-auto-save-file-name): Use make-temp-file.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 03 Mar 2002 21:57:59 +0000 |
parents | d12db931f164 |
children | 02ff23017427 |
files | lisp/files.el |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Sun Mar 03 21:55:33 2002 +0000 +++ b/lisp/files.el Sun Mar 03 21:57:59 2002 +0000 @@ -3342,13 +3342,14 @@ (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'.