* src/fileio.c (Fmake_temp_name): Doc tweaks.

Fixes: debbugs:19858
This commit is contained in:
Glenn Morris 2015-02-19 21:42:22 -08:00
parent 6f2971ab76
commit 35f047c066
2 changed files with 11 additions and 11 deletions

View file

@ -1,3 +1,7 @@
2015-02-20 Glenn Morris <rgm@gnu.org>
* fileio.c (Fmake_temp_name): Doc tweaks. (Bug#19858)
2015-02-14 Eli Zaretskii <eliz@gnu.org> 2015-02-14 Eli Zaretskii <eliz@gnu.org>
* menu.c (Fx_popup_menu) [HAVE_X_WINDOWS]: Call * menu.c (Fx_popup_menu) [HAVE_X_WINDOWS]: Call

View file

@ -828,20 +828,16 @@ make_temp_name (Lisp_Object prefix, bool base64_p)
DEFUN ("make-temp-name", Fmake_temp_name, Smake_temp_name, 1, 1, 0, DEFUN ("make-temp-name", Fmake_temp_name, Smake_temp_name, 1, 1, 0,
doc: /* Generate temporary file name (string) starting with PREFIX (a string). doc: /* Generate temporary file name (string) starting with PREFIX (a string).
The Emacs process number forms part of the result, The Emacs process number forms part of the result, so there is no
so there is no danger of generating a name being used by another process. danger of generating a name being used by another Emacs process
\(so long as only a single host can access the containing directory...).
In addition, this function makes an attempt to choose a name This function tries to choose a name that has no existing file.
which has no existing file. To make this work, For this to work, PREFIX should be an absolute file name.
PREFIX should be an absolute file name.
There is a race condition between calling `make-temp-name' and creating the There is a race condition between calling `make-temp-name' and creating the
file which opens all kinds of security holes. For that reason, you should file, which opens all kinds of security holes. For that reason, you should
probably use `make-temp-file' instead, except in three circumstances: normally use `make-temp-file' instead. */)
* If you are creating the file in the user's home directory.
* If you are creating a directory rather than an ordinary file.
* If you are taking special precautions as `make-temp-file' does. */)
(Lisp_Object prefix) (Lisp_Object prefix)
{ {
return make_temp_name (prefix, 0); return make_temp_name (prefix, 0);