diff options
| author | Paul Eggert | 2013-03-17 21:30:20 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-03-17 21:30:20 -0700 |
| commit | 982efbcdc4b44d595743cf9085ad64731417cde3 (patch) | |
| tree | e3cd03529909cb4fde00c06b2a27d273f73a9e9a /lisp | |
| parent | 2fcc7665107849677e6803b54cc7c668c0bcbd24 (diff) | |
| download | emacs-982efbcdc4b44d595743cf9085ad64731417cde3.tar.gz emacs-982efbcdc4b44d595743cf9085ad64731417cde3.zip | |
Automate the build of ja-dic.el.
ja-dic.el no longer needs to be in the repository: it's now
generated as part of the build from bzr. Also, update SKK-JISYO.L to
match the upstream source exactly.
* .bzrignore: Add leim/ja-dic/.
* leim/ja-dic/ja-dic.el: Remove from repository. It is still distributed
as part of the Emacs tarball.
* leim/Makefile.in ($(srcdir)/ja-dic/ja-dic.el): New rule.
(compile-main): Depend on it.
* leim/SKK-DIC/README: Update to reflect new build procedure.
* leim/SKK-DIC/SKK-JISYO.L: Update to match source exactly.
This is now the annotated version, to match the upstream file name;
the unannotated one is built from it automatically.
* lisp/international/ja-dic-cnv.el (skkdic-convert): Remove the annotations
from the input, rather than assume that it's been done for us by the
SKK script unannotate.awk. Switch ja-dic.el to UTF-8. Don't put
the current date into a ja-dic.el comment, as that complicates
regression testing.
Fixes: debbugs:13984
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/international/ja-dic-cnv.el | 14 |
2 files changed, 18 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9026fa9f093..c2fcef66164 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2013-03-18 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Automate the build of ja-dic.el (Bug#13984). | ||
| 4 | * international/ja-dic-cnv.el (skkdic-convert): Remove the annotations | ||
| 5 | from the input, rather than assume that it's been done for us by the | ||
| 6 | SKK script unannotate.awk. Switch ja-dic.el to UTF-8. Don't put | ||
| 7 | the current date into a ja-dic.el comment, as that complicates | ||
| 8 | regression testing. | ||
| 9 | |||
| 1 | 2013-03-18 Stefan Monnier <monnier@iro.umontreal.ca> | 10 | 2013-03-18 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 11 | ||
| 3 | * whitespace.el: Fix double evaluation. | 12 | * whitespace.el: Fix double evaluation. |
diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el index c0fcf19d841..5382dbe3ad7 100644 --- a/lisp/international/ja-dic-cnv.el +++ b/lisp/international/ja-dic-cnv.el | |||
| @@ -330,16 +330,21 @@ The name of generated file is specified by the variable `ja-dic-filename'." | |||
| 330 | (interactive "FSKK dictionary file: ") | 330 | (interactive "FSKK dictionary file: ") |
| 331 | (message "Reading file \"%s\" ..." filename) | 331 | (message "Reading file \"%s\" ..." filename) |
| 332 | (let* ((coding-system-for-read 'euc-japan) | 332 | (let* ((coding-system-for-read 'euc-japan) |
| 333 | (skkbuf(find-file-noselect (expand-file-name filename))) | 333 | (skkbuf (get-buffer-create " *skkdic-unnannotated*")) |
| 334 | (buf (get-buffer-create "*skkdic-work*"))) | 334 | (buf (get-buffer-create "*skkdic-work*"))) |
| 335 | ;; Set skkbuf to an unannotated copy of the dictionary. | ||
| 336 | (with-current-buffer skkbuf | ||
| 337 | (insert-file-contents (expand-file-name filename)) | ||
| 338 | (re-search-forward "^[^;]") | ||
| 339 | (while (re-search-forward ";[^\n/]*/" nil t) | ||
| 340 | (replace-match "/"))) | ||
| 335 | ;; Setup and generate the header part of working buffer. | 341 | ;; Setup and generate the header part of working buffer. |
| 336 | (with-current-buffer buf | 342 | (with-current-buffer buf |
| 337 | (erase-buffer) | 343 | (erase-buffer) |
| 338 | (buffer-disable-undo) | 344 | (buffer-disable-undo) |
| 339 | (insert ";;; ja-dic.el --- dictionary for Japanese input method" | 345 | (insert ";;; ja-dic.el --- dictionary for Japanese input method" |
| 340 | " -*-coding: euc-japan; -*-\n" | 346 | " -*-coding: utf-8; -*-\n" |
| 341 | ";;\tGenerated by the command `skkdic-convert'\n" | 347 | ";;\tGenerated by the command `skkdic-convert'\n" |
| 342 | ";;\tDate: " (current-time-string) "\n" | ||
| 343 | ";;\tOriginal SKK dictionary file: " | 348 | ";;\tOriginal SKK dictionary file: " |
| 344 | (file-relative-name (expand-file-name filename) dirname) | 349 | (file-relative-name (expand-file-name filename) dirname) |
| 345 | "\n\n" | 350 | "\n\n" |
| @@ -348,7 +353,6 @@ The name of generated file is specified by the variable `ja-dic-filename'." | |||
| 348 | ";; Do byte-compile this file again after any modification.\n\n" | 353 | ";; Do byte-compile this file again after any modification.\n\n" |
| 349 | ";;; Start of the header of the original SKK dictionary.\n\n") | 354 | ";;; Start of the header of the original SKK dictionary.\n\n") |
| 350 | (set-buffer skkbuf) | 355 | (set-buffer skkbuf) |
| 351 | (widen) | ||
| 352 | (goto-char 1) | 356 | (goto-char 1) |
| 353 | (let (pos) | 357 | (let (pos) |
| 354 | (search-forward ";; okuri-ari") | 358 | (search-forward ";; okuri-ari") |
| @@ -399,7 +403,7 @@ The name of generated file is specified by the variable `ja-dic-filename'." | |||
| 399 | ;; Save the working buffer. | 403 | ;; Save the working buffer. |
| 400 | (set-buffer buf) | 404 | (set-buffer buf) |
| 401 | (set-visited-file-name (expand-file-name ja-dic-filename dirname) t) | 405 | (set-visited-file-name (expand-file-name ja-dic-filename dirname) t) |
| 402 | (set-buffer-file-coding-system 'euc-japan) | 406 | (set-buffer-file-coding-system 'utf-8) |
| 403 | (save-buffer 0)) | 407 | (save-buffer 0)) |
| 404 | (kill-buffer skkbuf) | 408 | (kill-buffer skkbuf) |
| 405 | (switch-to-buffer buf))) | 409 | (switch-to-buffer buf))) |