From 3bd9b6132f1122ea938ef65e62b2cd919e2dfe8a Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 1 Aug 2022 14:28:05 +0200 Subject: [PATCH] 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. --- lisp/international/titdic-cnv.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el index 2a91e7cb5ec..080045e7520 100644 --- a/lisp/international/titdic-cnv.el +++ b/lisp/international/titdic-cnv.el @@ -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 -- 2.39.5