* lisp/international/ja-dic-cnv.el: Attempt to fix bug#41250

(skkdic-convert): Only bind `coding-system-for-read` where needed.
This commit is contained in:
Stefan Monnier 2020-10-06 09:34:20 -04:00
parent 61113a3254
commit 9a819568cc

View file

@ -329,12 +329,12 @@ Optional argument DIRNAME if specified is the directory name under which
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 "/")))