diff options
Diffstat (limited to 'doc/lispref/files.texi')
-rw-r--r-- | doc/lispref/files.texi | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 076c91c0c58..934ccaeadbe 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -1561,11 +1561,15 @@ file. This works only on some operating systems, and only if you have the correct permissions to do so. If the optional argument @var{preserve-permissions} is non-@code{nil}, -this function copies the file modes (or ``permissions''), as well as -its Access Control List and SELinux context (if any). -@xref{Information about Files}. Otherwise, if the destination is -created its file permission bits are those of the source, masked by -the default file permissions. +this function copies the file modes (or ``permissions'') of +@var{oldname} to @var{newname}, as well as the Access Control List and +SELinux context (if any). @xref{Information about Files}. + +Otherwise, the file modes of @var{newname} are left unchanged if it is +an existing file, and set to those of @var{oldname}, masked by the +default file permissions (see @code{set-default-file-modes} below), if +@var{newname} is to be newly created. The Access Control List or +SELinux context are not copied over in either case. @end deffn @deffn Command make-symbolic-link filename newname &optional ok-if-exists @@ -1636,13 +1640,12 @@ returns the permissions of a file. @defun set-default-file-modes mode @cindex umask -This function sets the default file permissions for new files created -by Emacs and its subprocesses. Every file created with Emacs -initially has these permissions, or a subset of them -(@code{write-region} will not grant execute permissions even if the -default file permissions allow execution). On Unix and GNU/Linux, the -default permissions are given by the bitwise complement of the -``umask'' value. +This function sets the default permissions for new files created by +Emacs and its subprocesses. Every file created with Emacs initially +has these permissions, or a subset of them (@code{write-region} will +not grant execute permissions even if the default file permissions +allow execution). On Unix and GNU/Linux, the default permissions are +given by the bitwise complement of the ``umask'' value. The argument @var{mode} should be an integer which specifies the permissions, similar to @code{set-file-modes} above. Only the lowest |