diff options
| author | Paul Eggert | 2017-11-25 13:04:30 -0800 |
|---|---|---|
| committer | Paul Eggert | 2017-11-25 13:05:05 -0800 |
| commit | dc7a97fb846cbec16a198d95903ae7a85916da9d (patch) | |
| tree | 20e53737746475b43e5b41ce76b3c4129676f696 /src | |
| parent | cfa2a944d4cf62f16c177398226b17aad88bb5c6 (diff) | |
| download | emacs-dc7a97fb846cbec16a198d95903ae7a85916da9d.tar.gz emacs-dc7a97fb846cbec16a198d95903ae7a85916da9d.zip | |
Tweak copy-file, rename-file doc
* src/fileio.c (Fcopy_file, Frename_file): Tweak the recent change
slightly, as NEWNAME is treated as a directory name depending only
on the contents of the NEWNAME string, and independently of
whether NEWNAME names a directory (i.e., whether the directory
exists) (Bug#29362).
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/fileio.c b/src/fileio.c index 9742cf1a258..c6b454bd9bd 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1826,10 +1826,8 @@ DEFUN ("copy-file", Fcopy_file, Scopy_file, 2, 6, | |||
| 1826 | "fCopy file: \nGCopy %s to file: \np\nP", | 1826 | "fCopy file: \nGCopy %s to file: \np\nP", |
| 1827 | doc: /* Copy FILE to NEWNAME. Both args must be strings. | 1827 | doc: /* Copy FILE to NEWNAME. Both args must be strings. |
| 1828 | If NEWNAME is a directory name, copy FILE to a like-named file under | 1828 | If NEWNAME is a directory name, copy FILE to a like-named file under |
| 1829 | NEWNAME. | 1829 | NEWNAME. For NEWNAME to be recognized as a directory name, it should |
| 1830 | 1830 | end in a slash. | |
| 1831 | For NEWNAME to be recognized as a directory name, it should name a | ||
| 1832 | directory and end in a slash. | ||
| 1833 | 1831 | ||
| 1834 | This function always sets the file modes of the output file to match | 1832 | This function always sets the file modes of the output file to match |
| 1835 | the input file. | 1833 | the input file. |
| @@ -2254,10 +2252,8 @@ DEFUN ("rename-file", Frename_file, Srename_file, 2, 3, | |||
| 2254 | doc: /* Rename FILE as NEWNAME. Both args must be strings. | 2252 | doc: /* Rename FILE as NEWNAME. Both args must be strings. |
| 2255 | If file has names other than FILE, it continues to have those names. | 2253 | If file has names other than FILE, it continues to have those names. |
| 2256 | If NEWNAME is a directory name, rename FILE to a like-named file under | 2254 | If NEWNAME is a directory name, rename FILE to a like-named file under |
| 2257 | NEWNAME. | 2255 | NEWNAME. For NEWNAME to be recognized as a directory name, it should |
| 2258 | 2256 | end in a slash. | |
| 2259 | For NEWNAME to be recognized as a directory name, it should name a | ||
| 2260 | directory and end in a slash. | ||
| 2261 | 2257 | ||
| 2262 | Signal a `file-already-exists' error if a file NEWNAME already exists | 2258 | Signal a `file-already-exists' error if a file NEWNAME already exists |
| 2263 | unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. | 2259 | unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. |