diff options
| author | Kenichi Handa | 2010-02-16 15:49:23 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-02-16 15:49:23 +0900 |
| commit | fa6ea913cb32e92839590f40c696b42a613f47cc (patch) | |
| tree | 7d1c3d0d894176a68620d37e41420430b8069cf0 | |
| parent | 737b5223e1c9521ecd8195185c4dbb3669e5a71c (diff) | |
| download | emacs-fa6ea913cb32e92839590f40c696b42a613f47cc.tar.gz emacs-fa6ea913cb32e92839590f40c696b42a613f47cc.zip | |
Fix for the new SKK-JISYO.L format.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/international/ja-dic-cnv.el | 47 |
2 files changed, 24 insertions, 29 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 52ca0354c29..681af61a897 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-02-16 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * international/ja-dic-cnv.el (iso-2022-7bit-short): Delete it. | ||
| 4 | (skkdic-convert-okuri-ari): Ignore lines starting with '>'. | ||
| 5 | (skkdic-convert): Use `euc-japan' coding system for writing. | ||
| 6 | |||
| 1 | 2010-02-14 Juanma Barranquero <lekktu@gmail.com> | 7 | 2010-02-14 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 8 | ||
| 3 | * outline.el (outline-head-from-level): | 9 | * outline.el (outline-head-from-level): |
diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el index 285a4a9ed03..e3a5f6721dc 100644 --- a/lisp/international/ja-dic-cnv.el +++ b/lisp/international/ja-dic-cnv.el | |||
| @@ -45,15 +45,6 @@ | |||
| 45 | ;; Name of a file to generate from SKK dictionary. | 45 | ;; Name of a file to generate from SKK dictionary. |
| 46 | (defvar ja-dic-filename "ja-dic.el") | 46 | (defvar ja-dic-filename "ja-dic.el") |
| 47 | 47 | ||
| 48 | ;; To make a generated ja-dic.el smaller. | ||
| 49 | (define-coding-system 'iso-2022-7bit-short | ||
| 50 | "Like `iso-2022-7bit' but no ASCII designation before SPC." | ||
| 51 | :coding-type 'iso-2022 | ||
| 52 | :mnemonic ?J | ||
| 53 | :charset-list 'iso-2022 | ||
| 54 | :designation [(ascii t) nil nil nil] | ||
| 55 | :flags '(short 7-bit designation)) | ||
| 56 | |||
| 57 | (defun skkdic-convert-okuri-ari (skkbuf buf) | 48 | (defun skkdic-convert-okuri-ari (skkbuf buf) |
| 58 | (message "Processing OKURI-ARI entries ...") | 49 | (message "Processing OKURI-ARI entries ...") |
| 59 | (goto-char (point-min)) | 50 | (goto-char (point-min)) |
| @@ -61,24 +52,22 @@ | |||
| 61 | (insert ";; Setting okuri-ari entries.\n" | 52 | (insert ";; Setting okuri-ari entries.\n" |
| 62 | "(skkdic-set-okuri-ari\n")) | 53 | "(skkdic-set-okuri-ari\n")) |
| 63 | (while (not (eobp)) | 54 | (while (not (eobp)) |
| 64 | (let ((from (point)) | 55 | (if (/= (following-char) ?>) |
| 65 | to) | 56 | (let ((from (point)) |
| 66 | (end-of-line) | 57 | (to (line-end-position))) |
| 67 | (setq to (point)) | 58 | (with-current-buffer buf |
| 68 | 59 | (insert-buffer-substring skkbuf from to) | |
| 69 | (with-current-buffer buf | 60 | (beginning-of-line) |
| 70 | (insert-buffer-substring skkbuf from to) | 61 | (insert "\"") |
| 71 | (beginning-of-line) | 62 | (search-forward " ") |
| 72 | (insert "\"") | 63 | (delete-char 1) ; delete the first '/' |
| 73 | (search-forward " ") | 64 | (let ((p (point))) |
| 74 | (delete-char 1) ; delete the first '/' | 65 | (end-of-line) |
| 75 | (let ((p (point))) | 66 | (delete-char -1) ; delete the last '/' |
| 76 | (end-of-line) | 67 | (subst-char-in-region p (point) ?/ ? 'noundo)) |
| 77 | (delete-char -1) ; delete the last '/' | 68 | (insert "\"\n")))) |
| 78 | (subst-char-in-region p (point) ?/ ? 'noundo)) | 69 | |
| 79 | (insert "\"\n")) | 70 | (forward-line 1)) |
| 80 | |||
| 81 | (forward-line 1))) | ||
| 82 | (with-current-buffer buf | 71 | (with-current-buffer buf |
| 83 | (insert ")\n\n"))) | 72 | (insert ")\n\n"))) |
| 84 | 73 | ||
| @@ -348,7 +337,7 @@ The name of generated file is specified by the variable `ja-dic-filename'." | |||
| 348 | (erase-buffer) | 337 | (erase-buffer) |
| 349 | (buffer-disable-undo) | 338 | (buffer-disable-undo) |
| 350 | (insert ";;; ja-dic.el --- dictionary for Japanese input method" | 339 | (insert ";;; ja-dic.el --- dictionary for Japanese input method" |
| 351 | " -*-coding: iso-2022-jp; byte-compile-disable-print-circle:t; -*-\n" | 340 | " -*-coding: euc-japan; byte-compile-disable-print-circle:t; -*-\n" |
| 352 | ";;\tGenerated by the command `skkdic-convert'\n" | 341 | ";;\tGenerated by the command `skkdic-convert'\n" |
| 353 | ";;\tDate: " (current-time-string) "\n" | 342 | ";;\tDate: " (current-time-string) "\n" |
| 354 | ";;\tOriginal SKK dictionary file: " | 343 | ";;\tOriginal SKK dictionary file: " |
| @@ -410,7 +399,7 @@ The name of generated file is specified by the variable `ja-dic-filename'." | |||
| 410 | ;; Save the working buffer. | 399 | ;; Save the working buffer. |
| 411 | (set-buffer buf) | 400 | (set-buffer buf) |
| 412 | (set-visited-file-name (expand-file-name ja-dic-filename dirname) t) | 401 | (set-visited-file-name (expand-file-name ja-dic-filename dirname) t) |
| 413 | (set-buffer-file-coding-system 'iso-2022-7bit-short) | 402 | (set-buffer-file-coding-system 'euc-japan) |
| 414 | (save-buffer 0)) | 403 | (save-buffer 0)) |
| 415 | (kill-buffer skkbuf) | 404 | (kill-buffer skkbuf) |
| 416 | (switch-to-buffer buf))) | 405 | (switch-to-buffer buf))) |