aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2002-12-17 11:39:59 +0000
committerKenichi Handa2002-12-17 11:39:59 +0000
commit42b01e1e9b09b8e8fbbfe921a894e01bd0de4d44 (patch)
tree8e415a4cda2d281705133a27a7863489e4225846 /src
parent6926d591360fcc9fb5b49a4311ad0e12fa1a898b (diff)
downloademacs-42b01e1e9b09b8e8fbbfe921a894e01bd0de4d44.tar.gz
emacs-42b01e1e9b09b8e8fbbfe921a894e01bd0de4d44.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index a8d27f0ef2d..996de3136de 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4624,7 +4624,15 @@ choose_write_coding_system (start, end, filename,
4624 if (auto_saving) 4624 if (auto_saving)
4625 val = Qnil; 4625 val = Qnil;
4626 else if (!NILP (Vcoding_system_for_write)) 4626 else if (!NILP (Vcoding_system_for_write))
4627 val = Vcoding_system_for_write; 4627 {
4628 val = Vcoding_system_for_write;
4629 if (coding_system_require_warning
4630 && !NILP (Ffboundp (Vselect_safe_coding_system_function)))
4631 /* Confirm that VAL can surely encode the current region. */
4632 val = call5 (Vselect_safe_coding_system_function,
4633 start, end, Fcons (Qt, Fcons (val, Qnil)),
4634 Qnil, filename);
4635 }
4628 else 4636 else
4629 { 4637 {
4630 /* If the variable `buffer-file-coding-system' is set locally, 4638 /* If the variable `buffer-file-coding-system' is set locally,