diff options
| author | Stefan Monnier | 2019-01-07 20:49:26 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2019-01-07 20:49:26 -0500 |
| commit | ce08594b2ae9dd7cf79c49ac4e1a06bee1c9ee22 (patch) | |
| tree | 9a8b4201412743010ff158a684d9aaa655576a26 | |
| parent | 73fe3ad168e390056355660ae1b47a6994ae0803 (diff) | |
| download | emacs-ce08594b2ae9dd7cf79c49ac4e1a06bee1c9ee22.tar.gz emacs-ce08594b2ae9dd7cf79c49ac4e1a06bee1c9ee22.zip | |
* lisp/international/titdic-cnv.el: Save generated files with utf-8
(titdic-convert, miscdic-convert): Use utf-8 when writing and don't
bother putting a `coding:` tag since utf-8 is the default anyway.
| -rw-r--r-- | lisp/international/titdic-cnv.el | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el index ac5a0e8861d..ed020fe32a9 100644 --- a/lisp/international/titdic-cnv.el +++ b/lisp/international/titdic-cnv.el | |||
| @@ -500,8 +500,7 @@ the generated Quail package is saved." | |||
| 500 | (goto-char (point-min)) | 500 | (goto-char (point-min)) |
| 501 | (decode-coding-region (point-min) (point-max) coding-system) | 501 | (decode-coding-region (point-min) (point-max) coding-system) |
| 502 | ;; Explicitly set eol format to `unix'. | 502 | ;; Explicitly set eol format to `unix'. |
| 503 | (setq coding-system-for-write | 503 | (setq coding-system-for-write 'utf-8-unix) |
| 504 | (coding-system-change-eol-conversion coding-system 'unix)) | ||
| 505 | (remove-text-properties (point-min) (point-max) '(charset nil))) | 504 | (remove-text-properties (point-min) (point-max) '(charset nil))) |
| 506 | 505 | ||
| 507 | (set-buffer-multibyte t) | 506 | (set-buffer-multibyte t) |
| @@ -522,7 +521,6 @@ the generated Quail package is saved." | |||
| 522 | (princ ";; Local Variables:\n") | 521 | (princ ";; Local Variables:\n") |
| 523 | (princ ";; version-control: never\n") | 522 | (princ ";; version-control: never\n") |
| 524 | (princ ";; no-update-autoloads: t\n") | 523 | (princ ";; no-update-autoloads: t\n") |
| 525 | (princ (format ";; coding: %s\n" coding-system-for-write)) | ||
| 526 | (princ ";; End:\n")))))) | 524 | (princ ";; End:\n")))))) |
| 527 | 525 | ||
| 528 | ;;;###autoload | 526 | ;;;###autoload |
| @@ -1148,8 +1146,7 @@ the generated Quail package is saved." | |||
| 1148 | copyright (nth 6 slot)) | 1146 | copyright (nth 6 slot)) |
| 1149 | (message "Converting %s to %s..." dicfile quailfile) | 1147 | (message "Converting %s to %s..." dicfile quailfile) |
| 1150 | ;; Explicitly set eol format to `unix'. | 1148 | ;; Explicitly set eol format to `unix'. |
| 1151 | (setq coding-system-for-write | 1149 | (setq coding-system-for-write 'utf-8-unix) |
| 1152 | (coding-system-change-eol-conversion coding 'unix)) | ||
| 1153 | (with-temp-file (expand-file-name quailfile dirname) | 1150 | (with-temp-file (expand-file-name quailfile dirname) |
| 1154 | (insert (format-message ";; Quail package `%s'\n" name)) | 1151 | (insert (format-message ";; Quail package `%s'\n" name)) |
| 1155 | (insert (format-message | 1152 | (insert (format-message |
| @@ -1178,7 +1175,6 @@ the generated Quail package is saved." | |||
| 1178 | (insert ";; Local Variables:\n" | 1175 | (insert ";; Local Variables:\n" |
| 1179 | ";; version-control: never\n" | 1176 | ";; version-control: never\n" |
| 1180 | ";; no-update-autoloads: t\n" | 1177 | ";; no-update-autoloads: t\n" |
| 1181 | (format ";; coding: %s\n" coding) | ||
| 1182 | ";; End:\n\n" | 1178 | ";; End:\n\n" |
| 1183 | ";;; " quailfile " ends here\n")) | 1179 | ";;; " quailfile " ends here\n")) |
| 1184 | (message "Converting %s to %s...done" dicfile quailfile)) | 1180 | (message "Converting %s to %s...done" dicfile quailfile)) |