diff options
| author | Kenichi Handa | 1997-06-09 12:59:52 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-06-09 12:59:52 +0000 |
| commit | 115af12793ece3bb37b83a2564444898ba4dc2ce (patch) | |
| tree | cba9cda4d01c9e2862c5d208373ab4df47350890 | |
| parent | 2e0a2a9cfd7982e32adc3e0315bd06ab5bd0bc80 (diff) | |
| download | emacs-115af12793ece3bb37b83a2564444898ba4dc2ce.tar.gz emacs-115af12793ece3bb37b83a2564444898ba4dc2ce.zip | |
(Fwrite_region): Cancel the 7th argument CODING_SYSTEM
added by the previous change.
(auto_save_1): Adjusted for the above change.
| -rw-r--r-- | src/fileio.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/fileio.c b/src/fileio.c index 143148193a4..3a0b65d1181 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3746,8 +3746,8 @@ build_annotations_unwind (buf) | |||
| 3746 | return Qnil; | 3746 | return Qnil; |
| 3747 | } | 3747 | } |
| 3748 | 3748 | ||
| 3749 | DEFUN ("write-region", Fwrite_region, Swrite_region, 3, 7, | 3749 | DEFUN ("write-region", Fwrite_region, Swrite_region, 3, 6, |
| 3750 | "r\nFWrite region to file: \ni\ni\ni\nZCoding system: ", | 3750 | "r\nFWrite region to file: ", |
| 3751 | "Write current region into specified file.\n\ | 3751 | "Write current region into specified file.\n\ |
| 3752 | When called from a program, takes three arguments:\n\ | 3752 | When called from a program, takes three arguments:\n\ |
| 3753 | START, END and FILENAME. START and END are buffer positions.\n\ | 3753 | START, END and FILENAME. START and END are buffer positions.\n\ |
| @@ -3762,18 +3762,10 @@ If VISIT is a string, it is a second file name;\n\ | |||
| 3762 | If VISIT is neither t nor nil nor a string,\n\ | 3762 | If VISIT is neither t nor nil nor a string,\n\ |
| 3763 | that means do not print the \"Wrote file\" message.\n\ | 3763 | that means do not print the \"Wrote file\" message.\n\ |
| 3764 | The optional sixth arg LOCKNAME, if non-nil, specifies the name to\n\ | 3764 | The optional sixth arg LOCKNAME, if non-nil, specifies the name to\n\ |
| 3765 | use for locking and unlocking, overriding FILENAME and VISIT.\n\ | ||
| 3766 | The optional seventh arg CODING-SYSTEM, if non-nil, specifies the coding\n\ | ||
| 3767 | system to be used for encoding characters. For interactive use,\n\ | ||
| 3768 | you can specify it by giving a prefix argument. If no coding system\n\ | ||
| 3769 | is specified, the current region is encoded according to the value of\n\ | ||
| 3770 | `coding-system-for-write' or `coding-system-alist'. The variable\n\ | ||
| 3771 | `last-coding-system-used' is set the coding system actually used.\n\ | ||
| 3772 | Kludgy feature: if START is a string, then that string is written\n\ | 3765 | Kludgy feature: if START is a string, then that string is written\n\ |
| 3773 | to the file, instead of any buffer contents, and END is ignored.") | 3766 | to the file, instead of any buffer contents, and END is ignored.") |
| 3774 | (start, end, filename, append, visit, lockname, coding_system_symbol) | 3767 | (start, end, filename, append, visit, lockname) |
| 3775 | Lisp_Object start, end, filename, append, visit, lockname; | 3768 | Lisp_Object start, end, filename, append, visit, lockname; |
| 3776 | Lisp_Object coding_system_symbol; | ||
| 3777 | { | 3769 | { |
| 3778 | register int desc; | 3770 | register int desc; |
| 3779 | int failure; | 3771 | int failure; |
| @@ -3804,7 +3796,7 @@ to the file, instead of any buffer contents, and END is ignored.") | |||
| 3804 | if (!NILP (start) && !STRINGP (start)) | 3796 | if (!NILP (start) && !STRINGP (start)) |
| 3805 | validate_region (&start, &end); | 3797 | validate_region (&start, &end); |
| 3806 | 3798 | ||
| 3807 | GCPRO5 (start, filename, visit, lockname, coding_system_symbol); | 3799 | GCPRO4 (start, filename, visit, lockname); |
| 3808 | 3800 | ||
| 3809 | /* Decide the coding-system to be encoded to. */ | 3801 | /* Decide the coding-system to be encoded to. */ |
| 3810 | { | 3802 | { |
| @@ -3812,8 +3804,6 @@ to the file, instead of any buffer contents, and END is ignored.") | |||
| 3812 | 3804 | ||
| 3813 | if (auto_saving || NILP (current_buffer->enable_multibyte_characters)) | 3805 | if (auto_saving || NILP (current_buffer->enable_multibyte_characters)) |
| 3814 | val = Qnil; | 3806 | val = Qnil; |
| 3815 | else if (!NILP (coding_system_symbol)) | ||
| 3816 | val = coding_system_symbol; | ||
| 3817 | else if (!NILP (Vcoding_system_for_write)) | 3807 | else if (!NILP (Vcoding_system_for_write)) |
| 3818 | val = Vcoding_system_for_write; | 3808 | val = Vcoding_system_for_write; |
| 3819 | else if (!NILP (Flocal_variable_if_set_p (Qbuffer_file_coding_system, | 3809 | else if (!NILP (Flocal_variable_if_set_p (Qbuffer_file_coding_system, |
| @@ -3829,7 +3819,7 @@ to the file, instead of any buffer contents, and END is ignored.") | |||
| 3829 | coding_systems = Ffind_coding_system (7, args); | 3819 | coding_systems = Ffind_coding_system (7, args); |
| 3830 | val = (CONSP (coding_systems) | 3820 | val = (CONSP (coding_systems) |
| 3831 | ? XCONS (coding_systems)->cdr | 3821 | ? XCONS (coding_systems)->cdr |
| 3832 | : Fsymbol_value (Qbuffer_file_coding_system)); | 3822 | : current_buffer->buffer_file_coding_system); |
| 3833 | } | 3823 | } |
| 3834 | setup_coding_system (Fcheck_coding_system (val), &coding); | 3824 | setup_coding_system (Fcheck_coding_system (val), &coding); |
| 3835 | if (!STRINGP (start) && !NILP (current_buffer->selective_display)) | 3825 | if (!STRINGP (start) && !NILP (current_buffer->selective_display)) |
| @@ -4457,7 +4447,7 @@ auto_save_1 () | |||
| 4457 | return | 4447 | return |
| 4458 | Fwrite_region (Qnil, Qnil, | 4448 | Fwrite_region (Qnil, Qnil, |
| 4459 | current_buffer->auto_save_file_name, | 4449 | current_buffer->auto_save_file_name, |
| 4460 | Qnil, Qlambda, Qnil, Qnil); | 4450 | Qnil, Qlambda, Qnil); |
| 4461 | } | 4451 | } |
| 4462 | 4452 | ||
| 4463 | static Lisp_Object | 4453 | static Lisp_Object |