Subject: bug#44486: 27.1; C-@ chars corrupt elisp buffer

From: Eli Zaretskii <[email-masked]>
Date: Fri, 06 Nov 2020 22:07:10 +0200

> Date: Fri, 06 Nov 2020 18:17:53 +0200
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> > Date: Fri, 06 Nov 2020 17:40:50 +0200
> > From: Eli Zaretskii <[email-masked]>
> > Cc: [email-masked], [email-masked]
> > 
> > Or set inhibit-nul-byte-detection to a non-nil value before
> > reverting
> 
> Actually, this doesn't seem to work, but it looks like a bug...

We don't specify that prefer-utf-8, which is used by default for *.el
files, should heed this variable.  Since prefer-utf-8 is a variant of
'undecided', i.e. it performs detection of encoding, I think this is a
bug, because 'undecided' does pay attention to
inhibit-null-byte-detection.

So I propose the change below (for master).  Any objections?

diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el
index e6e6135..16cd8cf 100644
--- a/lisp/international/mule-conf.el
+++ b/lisp/international/mule-conf.el
@@ -1251,7 +1251,9 @@ 'prefer-utf-8
   :coding-type 'undecided
   :mnemonic ?-
   :charset-list '(emacs)
-  :prefer-utf-8 t)
+  :prefer-utf-8 t
+  :inhibit-null-byte-detection 0
+  :inhibit-iso-escape-detection 0)
 
 (define-coding-system 'raw-text
   "Raw text, which means text contains random 8-bit codes.