Subject: bug#41250: 28.0.50; Dired displays unconditionally ls-switches on modeline

From: Stefan Monnier <[email-masked]>
Date: Tue, 06 Oct 2020 09:08:40 -0400

>> So the question is why loading mule-util.el produces this error?
> Because skkdic-convert binds coding-system-for-read to euc-japan.
>
> $ ../src/bootstrap-emacs -batch --eval "(let ((coding-system-for-read
> 'euc-japan)) (require 'mule-util))"
> Invalid read syntax: "?"

Does the patch below address the issue?

        Stefan

diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el
index f5e70ce702..5f645b6e8e 100644
--- a/lisp/international/ja-dic-cnv.el
+++ b/lisp/international/ja-dic-cnv.el
@@ -329,12 +329,12 @@ skkdic-convert
 the generated Emacs Lisp is saved.
 The name of generated file is specified by the variable `ja-dic-filename'."
   (interactive "FSKK dictionary file: ")
-  (let* ((coding-system-for-read 'euc-japan)
-	 (skkbuf (get-buffer-create " *skkdic-unannotated*"))
+  (let* ((skkbuf (get-buffer-create " *skkdic-unannotated*"))
 	 (buf (get-buffer-create "*skkdic-work*")))
     ;; Set skkbuf to an unannotated copy of the dictionary.
     (with-current-buffer skkbuf
-      (insert-file-contents (expand-file-name filename))
+      (let ((coding-system-for-read 'euc-japan))
+        (insert-file-contents (expand-file-name filename)))
       (re-search-forward "^[^;]")
       (while (re-search-forward ";[^\n/]*/" nil t)
 	(replace-match "/")))