diff options
| author | Karl Heuer | 1998-06-05 16:02:11 +0000 |
|---|---|---|
| committer | Karl Heuer | 1998-06-05 16:02:11 +0000 |
| commit | 6cf71bf1f744dae3ec072dffb40434304190db22 (patch) | |
| tree | 5824b6d93f7063bbe792b44bab54b95e3b761982 /src/fileio.c | |
| parent | 640e9445523f4cfbc9789926dab69d428303adb4 (diff) | |
| download | emacs-6cf71bf1f744dae3ec072dffb40434304190db22.tar.gz emacs-6cf71bf1f744dae3ec072dffb40434304190db22.zip | |
(Finsert_file_contents): Always update
Vlast_coding_system_used when we actually perform IO.
(Fwrite_region): Update documentation.
Diffstat (limited to 'src/fileio.c')
| -rw-r--r-- | src/fileio.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/fileio.c b/src/fileio.c index 8aa87038cfd..66ac9587342 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3266,10 +3266,11 @@ the whole thing because (1) it preserves some marker positions\n\ | |||
| 3266 | and (2) it puts less data in the undo list.\n\ | 3266 | and (2) it puts less data in the undo list.\n\ |
| 3267 | When REPLACE is non-nil, the value is the number of characters actually read,\n\ | 3267 | When REPLACE is non-nil, the value is the number of characters actually read,\n\ |
| 3268 | which is often less than the number of characters to be read.\n\ | 3268 | which is often less than the number of characters to be read.\n\ |
| 3269 | \n\ | ||
| 3269 | This does code conversion according to the value of\n\ | 3270 | This does code conversion according to the value of\n\ |
| 3270 | `coding-system-for-read' or `file-coding-system-alist',\n\ | 3271 | `coding-system-for-read' or `file-coding-system-alist',\n\ |
| 3271 | and sets the variable `last-coding-system-used' to the coding system\n\ | 3272 | and sets the variable `last-coding-system-used' to the coding system\n\ |
| 3272 | actually used.") | 3273 | actually used.") |
| 3273 | (filename, visit, beg, end, replace) | 3274 | (filename, visit, beg, end, replace) |
| 3274 | Lisp_Object filename, visit, beg, end, replace; | 3275 | Lisp_Object filename, visit, beg, end, replace; |
| 3275 | { | 3276 | { |
| @@ -3542,6 +3543,9 @@ This does code conversion according to the value of\n\ | |||
| 3542 | } | 3543 | } |
| 3543 | else | 3544 | else |
| 3544 | setup_coding_system (Fcheck_coding_system (val), &coding); | 3545 | setup_coding_system (Fcheck_coding_system (val), &coding); |
| 3546 | |||
| 3547 | /* Ensure we always set Vlast_coding_system_used. */ | ||
| 3548 | set_coding_system = 1; | ||
| 3545 | } | 3549 | } |
| 3546 | 3550 | ||
| 3547 | /* If requested, replace the accessible part of the buffer | 3551 | /* If requested, replace the accessible part of the buffer |
| @@ -4029,8 +4033,6 @@ This does code conversion according to the value of\n\ | |||
| 4029 | #endif | 4033 | #endif |
| 4030 | } | 4034 | } |
| 4031 | 4035 | ||
| 4032 | set_coding_system = 1; | ||
| 4033 | |||
| 4034 | notfound: | 4036 | notfound: |
| 4035 | handled: | 4037 | handled: |
| 4036 | 4038 | ||
| @@ -4157,7 +4159,13 @@ The optional sixth arg LOCKNAME, if non-nil, specifies the name to\n\ | |||
| 4157 | The optional seventh arg CONFIRM, if non-nil, says ask for confirmation\n\ | 4159 | The optional seventh arg CONFIRM, if non-nil, says ask for confirmation\n\ |
| 4158 | before overwriting an existing file.\n\ | 4160 | before overwriting an existing file.\n\ |
| 4159 | Kludgy feature: if START is a string, then that string is written\n\ | 4161 | Kludgy feature: if START is a string, then that string is written\n\ |
| 4160 | to the file, instead of any buffer contents, and END is ignored.") | 4162 | to the file, instead of any buffer contents, and END is ignored.\n\ |
| 4163 | \n\ | ||
| 4164 | This does code conversion according to the value of\n\ | ||
| 4165 | `coding-system-for-write', `buffer-file-coding-system', or\n\ | ||
| 4166 | `file-coding-system-alist', and sets the variable\n\ | ||
| 4167 | `last-coding-system-used' to the coding system actually used.") | ||
| 4168 | |||
| 4161 | (start, end, filename, append, visit, lockname, confirm) | 4169 | (start, end, filename, append, visit, lockname, confirm) |
| 4162 | Lisp_Object start, end, filename, append, visit, lockname, confirm; | 4170 | Lisp_Object start, end, filename, append, visit, lockname, confirm; |
| 4163 | { | 4171 | { |