Mercurial > emacs
comparison lisp/international/ja-dic-cnv.el @ 88406:934ee50a6eb3
(skkdic-get-kana-compact-codes): Call encode-char instead of
split-char.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 01 Mar 2002 02:08:10 +0000 |
parents | 758a6e658e72 |
children | d0d26a8cd2f8 |
comparison
equal
deleted
inserted
replaced
88405:8ae0d0693ed9 | 88406:934ee50a6eb3 |
---|---|
44 | 44 |
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. | 48 ;; To make a generated ja-dic.el smaller. |
49 (make-coding-system | 49 (define-coding-system 'iso-2022-7bit-short |
50 'iso-2022-7bit-short | |
51 2 ?J | |
52 "Like `iso-2022-7bit' but no ASCII designation before SPC." | 50 "Like `iso-2022-7bit' but no ASCII designation before SPC." |
53 '(ascii nil nil nil t t nil t) | 51 :coding-type 'iso-2022 |
54 '((safe-charsets . t))) | 52 :mnemonic ?J |
53 :charset-list 'iso-2022 | |
54 :designation [(ascii t) nil nil nil] | |
55 :flags '(short 7-bit designation)) | |
55 | 56 |
56 (defun skkdic-convert-okuri-ari (skkbuf buf) | 57 (defun skkdic-convert-okuri-ari (skkbuf buf) |
57 (message "Processing OKURI-ARI entries ...") | 58 (message "Processing OKURI-ARI entries ...") |
58 (goto-char (point-min)) | 59 (goto-char (point-min)) |
59 (save-excursion | 60 (save-excursion |
473 (aset vec i | 474 (aset vec i |
474 (if (< ch 128) ; CH is an ASCII letter for OKURIGANA, | 475 (if (< ch 128) ; CH is an ASCII letter for OKURIGANA, |
475 (- ch) ; represented by a negative code. | 476 (- ch) ; represented by a negative code. |
476 (if (= ch ?$B!<(B) ; `$B!<(B' is represented by 0. | 477 (if (= ch ?$B!<(B) ; `$B!<(B' is represented by 0. |
477 0 | 478 0 |
478 (- (nth 2 (split-char ch)) 32)))) | 479 (- (logand (encode-char ch 'japanese-jisx0208) #xFF) 32)))) |
479 (setq i (1+ i))) | 480 (setq i (1+ i))) |
480 vec)) | 481 vec)) |
481 | 482 |
482 (defun skkdic-extract-conversion-data (entry) | 483 (defun skkdic-extract-conversion-data (entry) |
483 (string-match "^\\cj+[a-z]* " entry) | 484 (string-match "^\\cj+[a-z]* " entry) |