# HG changeset patch # User Richard M. Stallman # Date 952610363 0 # Node ID 25557ce6a3a031678808887933a3eebc85d83980 # Parent d7a87f6a889fee92cbd51162b340bcdc36215693 *** empty log message *** diff -r d7a87f6a889f -r 25557ce6a3a0 lispref/files.texi --- a/lispref/files.texi Thu Mar 09 13:40:34 2000 +0000 +++ b/lispref/files.texi Thu Mar 09 13:59:23 2000 +0000 @@ -1328,15 +1328,22 @@ @defun set-default-file-modes mode This function sets the default file protection for new files created by Emacs and its subprocesses. Every file created with Emacs initially has -this protection. On Unix and GNU/Linux, the default protection is the -bitwise complement of the ``umask'' value. +this protection, or a subset of it (@code{write-region} will not give a +file execute permission even if the default file protection allows +execute permission). On Unix and GNU/Linux, the default protection is +the bitwise complement of the ``umask'' value. The argument @var{mode} must be an integer. On most systems, only the -low 9 bits of @var{mode} are meaningful. +low 9 bits of @var{mode} are meaningful. You can use the Lisp construct +for octal character codes to enter @var{mode}; for example, + +@example +(set-default-file-modes ?\644) +@end example Saving a modified version of an existing file does not count as creating -the file; it does not change the file's mode, and does not use the -default file protection. +the file; it preserves the existing file's mode, whatever that is. So +the default file protection has no effect. @end defun @defun default-file-modes