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:
parent
6926d59136
commit
42b01e1e9b
1 changed files with 9 additions and 1 deletions
10
src/fileio.c
10
src/fileio.c
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue