comparison src/fileio.c @ 45561:54b933234eb4

(Fwrite_region): If START is a string, don't make any annotations.
author Richard M. Stallman <rms@gnu.org>
date Tue, 28 May 2002 20:25:46 +0000
parents 811d06e337cb
children 6d7e86e98b2c
comparison
equal deleted inserted replaced
45560:f1be57638503 45561:54b933234eb4
4825 4825
4826 record_unwind_protect (build_annotations_unwind, Fcurrent_buffer ()); 4826 record_unwind_protect (build_annotations_unwind, Fcurrent_buffer ());
4827 count1 = specpdl_ptr - specpdl; 4827 count1 = specpdl_ptr - specpdl;
4828 4828
4829 given_buffer = current_buffer; 4829 given_buffer = current_buffer;
4830 annotations = build_annotations (start, end); 4830
4831 if (current_buffer != given_buffer) 4831 if (!STRINGP (start))
4832 { 4832 {
4833 XSETFASTINT (start, BEGV); 4833 annotations = build_annotations (start, end);
4834 XSETFASTINT (end, ZV); 4834
4835 if (current_buffer != given_buffer)
4836 {
4837 XSETFASTINT (start, BEGV);
4838 XSETFASTINT (end, ZV);
4839 }
4835 } 4840 }
4836 4841
4837 UNGCPRO; 4842 UNGCPRO;
4838 4843
4839 GCPRO5 (start, filename, annotations, visit_file, lockname); 4844 GCPRO5 (start, filename, annotations, visit_file, lockname);
4845 choose_write_coding_system (start, end, filename, 4850 choose_write_coding_system (start, end, filename,
4846 append, visit, lockname, &coding); 4851 append, visit, lockname, &coding);
4847 Vlast_coding_system_used = coding.symbol; 4852 Vlast_coding_system_used = coding.symbol;
4848 4853
4849 given_buffer = current_buffer; 4854 given_buffer = current_buffer;
4850 annotations = build_annotations_2 (start, end, 4855 if (! STRINGP (start))
4851 coding.pre_write_conversion, annotations); 4856 {
4852 if (current_buffer != given_buffer) 4857 annotations = build_annotations_2 (start, end,
4853 { 4858 coding.pre_write_conversion, annotations);
4854 XSETFASTINT (start, BEGV); 4859 if (current_buffer != given_buffer)
4855 XSETFASTINT (end, ZV); 4860 {
4861 XSETFASTINT (start, BEGV);
4862 XSETFASTINT (end, ZV);
4863 }
4856 } 4864 }
4857 4865
4858 #ifdef CLASH_DETECTION 4866 #ifdef CLASH_DETECTION
4859 if (!auto_saving) 4867 if (!auto_saving)
4860 { 4868 {