1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 04:10:27 -08:00

(choose_write_coding_system): Even if

Vcoding_system_for_write is non-nil, if
coding_system_require_warning is nonzero, call
Vselect_safe_coding_system_function.
This commit is contained in:
Kenichi Handa 2002-12-17 11:39:59 +00:00
parent 6926d59136
commit 42b01e1e9b

View file

@ -4624,7 +4624,15 @@ choose_write_coding_system (start, end, filename,
if (auto_saving)
val = Qnil;
else if (!NILP (Vcoding_system_for_write))
val = Vcoding_system_for_write;
{
val = Vcoding_system_for_write;
if (coding_system_require_warning
&& !NILP (Ffboundp (Vselect_safe_coding_system_function)))
/* Confirm that VAL can surely encode the current region. */
val = call5 (Vselect_safe_coding_system_function,
start, end, Fcons (Qt, Fcons (val, Qnil)),
Qnil, filename);
}
else
{
/* If the variable `buffer-file-coding-system' is set locally,