diff options
| author | Eli Zaretskii | 2017-10-27 16:53:16 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-10-27 16:53:16 +0300 |
| commit | ec08d70b4fe8d124c385d8184301e9769abb7dd6 (patch) | |
| tree | e06ea520d8f6e6b540a315a0ad2fd66632a03241 /src | |
| parent | 933b3a3ee8dd15abad3cc8d698e75c7af9eb8c93 (diff) | |
| download | emacs-ec08d70b4fe8d124c385d8184301e9769abb7dd6.tar.gz emacs-ec08d70b4fe8d124c385d8184301e9769abb7dd6.zip | |
Improve documentation of set-default-file-modes
* src/fileio.c (Fset_default_file_modes): Doc fix. (Bug#28875)
* doc/lispref/files.texi (Changing Files): Clarify how the bits in
the argument of set-default-file-modes are used for setting file
permissions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index b7df38c8570..92cc39496c4 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3125,7 +3125,15 @@ symbolic notation, like the `chmod' command from GNU Coreutils. */) | |||
| 3125 | DEFUN ("set-default-file-modes", Fset_default_file_modes, Sset_default_file_modes, 1, 1, 0, | 3125 | DEFUN ("set-default-file-modes", Fset_default_file_modes, Sset_default_file_modes, 1, 1, 0, |
| 3126 | doc: /* Set the file permission bits for newly created files. | 3126 | doc: /* Set the file permission bits for newly created files. |
| 3127 | The argument MODE should be an integer; only the low 9 bits are used. | 3127 | The argument MODE should be an integer; only the low 9 bits are used. |
| 3128 | This setting is inherited by subprocesses. */) | 3128 | On Posix hosts, this setting is inherited by subprocesses. |
| 3129 | |||
| 3130 | This function works by setting the Emacs's file mode creation mask. | ||
| 3131 | Each bit that is set in the mask means that the corresponding bit | ||
| 3132 | in the the permissions of newly created files will be disabled. | ||
| 3133 | |||
| 3134 | Note that when `write-region' creates a file, it resets the | ||
| 3135 | execute bit, even if the mask set by this function allows that bit | ||
| 3136 | by having the corresponding bit in the mask reset. */) | ||
| 3129 | (Lisp_Object mode) | 3137 | (Lisp_Object mode) |
| 3130 | { | 3138 | { |
| 3131 | mode_t oldrealmask, oldumask, newumask; | 3139 | mode_t oldrealmask, oldumask, newumask; |