From a1a724d73afae87b8c4daa2d64382be06fa37d0e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 9 Nov 2019 21:40:53 +0200 Subject: [PATCH] Fix an error in selecting encoding when writing zip files * lisp/international/mule-cmds.el (select-safe-coding-system): Treat no-conversion-multibyte that came from find-auto-coding the same as no-conversion for the purposes of encoding. The same logic that considers no-conversion always safe should do the same with no-conversion-multibyte. (Bug#38155) --- lisp/international/mule-cmds.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 1edf80d14c8..e4f5bb2a5f0 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -896,6 +896,11 @@ It is highly recommended to fix it before writing to a file." ;; other setting. (let ((base (coding-system-base auto-cs))) (unless (memq base '(nil undecided)) + ;; For encoding, no-conversion-multibyte is the same as + ;; no-conversion. + (if (eq base 'no-conversion-multibyte) + (setq auto-cs 'no-conversion + base 'no-conversion)) (setq default-coding-system (list (cons auto-cs base))) (setq no-other-defaults t)))) -- 2.39.5