Fix loaddefs quirk w.r.t. pinyin-convert

* lisp/international/titdic-cnv.el (pinyin-convert): Use
`generate-lisp-file' for the file.  This avoids having it scanned
by loaddefs-gen, which will trigger re-compilation of Emacs since
pinyin.el is generated after Emacs is built.
This commit is contained in:
Lars Ingebrigtsen 2022-08-01 14:28:05 +02:00
parent 7c8bd8802b
commit 3bd9b6132f

View file

@ -1191,10 +1191,7 @@ The library is named pinyin.el, and contains the constant
(dst-file (cadr command-line-args-left))
(coding-system-for-write 'utf-8-unix))
(with-temp-file dst-file
(insert ";;; " (file-name-nondirectory dst-file)
" -*- lexical-binding:t -*-
;; This file is automatically generated from pinyin.map, by the
;; function pinyin-convert.\n\n")
(generate-lisp-file-heading dst-file 'pinyin-convert)
(insert "(defconst pinyin-character-map\n'(")
(let ((pos (point)))
(insert-file-contents src-file)
@ -1214,7 +1211,7 @@ The library is named pinyin.el, and contains the constant
(forward-line 1)))
(insert ")\n\"An alist holding correspondences between pinyin syllables\
and\nChinese characters.\")\n\n")
(insert "(provide 'pinyin)\n"))
(generate-lisp-file-trailer dst-file :compile t))
(kill-emacs 0)))
;;; titdic-cnv.el ends here