diff options
| author | Kenichi Handa | 1998-01-22 01:42:20 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-01-22 01:42:20 +0000 |
| commit | 2791eeaaade94539ec56ae785e43b15debebcaa8 (patch) | |
| tree | e21dccf73b21a008b0d0feaf47b1278aab8699b2 /lisp | |
| parent | 6c7f60586c917cba51cf90d3bfe95242f5927c34 (diff) | |
| download | emacs-2791eeaaade94539ec56ae785e43b15debebcaa8.tar.gz emacs-2791eeaaade94539ec56ae785e43b15debebcaa8.zip | |
(skkdic-jbytes): Variable deleted.
All codes using this variable adjusted.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/international/skkdic-cnv.el | 29 | ||||
| -rw-r--r-- | lisp/international/skkdic-utl.el | 5 |
2 files changed, 14 insertions, 20 deletions
diff --git a/lisp/international/skkdic-cnv.el b/lisp/international/skkdic-cnv.el index 5bbfaeee354..06f8421478b 100644 --- a/lisp/international/skkdic-cnv.el +++ b/lisp/international/skkdic-cnv.el | |||
| @@ -52,9 +52,6 @@ | |||
| 52 | "Like `iso-2022-7bit' but no ASCII designation before SPC." | 52 | "Like `iso-2022-7bit' but no ASCII designation before SPC." |
| 53 | '(ascii nil nil nil t t nil t)) | 53 | '(ascii nil nil nil t t nil t)) |
| 54 | 54 | ||
| 55 | (defconst skkdic-jbytes | ||
| 56 | (charset-bytes 'japanese-jisx0208)) | ||
| 57 | |||
| 58 | (defun skkdic-convert-okuri-ari (skkbuf buf) | 55 | (defun skkdic-convert-okuri-ari (skkbuf buf) |
| 59 | (message "Processing OKURI-ARI entries ...") | 56 | (message "Processing OKURI-ARI entries ...") |
| 60 | (goto-char (point-min)) | 57 | (goto-char (point-min)) |
| @@ -220,9 +217,9 @@ | |||
| 220 | 217 | ||
| 221 | (defun skkdic-breakup-string (skkbuf kana str from to &optional first) | 218 | (defun skkdic-breakup-string (skkbuf kana str from to &optional first) |
| 222 | (let ((len (- to from))) | 219 | (let ((len (- to from))) |
| 223 | (or (and (>= len (* skkdic-jbytes 2)) | 220 | (or (and (>= len 2) |
| 224 | (let ((min-idx (+ from (* skkdic-jbytes 2))) | 221 | (let ((min-idx (+ from 2)) |
| 225 | (idx (if first (- to skkdic-jbytes) to)) | 222 | (idx (if first (1- to ) to)) |
| 226 | (found nil)) | 223 | (found nil)) |
| 227 | (while (and (not found) (>= idx min-idx)) | 224 | (while (and (not found) (>= idx min-idx)) |
| 228 | (let ((kana2-list (skkdic-get-entry | 225 | (let ((kana2-list (skkdic-get-entry |
| @@ -243,18 +240,18 @@ | |||
| 243 | (and (stringp kana2-list) | 240 | (and (stringp kana2-list) |
| 244 | (string-match kana2-list kana))) | 241 | (string-match kana2-list kana))) |
| 245 | (setq found t) | 242 | (setq found t) |
| 246 | (setq idx (- idx skkdic-jbytes))))) | 243 | (setq idx (1- idx))))) |
| 247 | found)) | 244 | found)) |
| 248 | (and first | 245 | (and first |
| 249 | (> len (* skkdic-jbytes 2)) | 246 | (> len 2) |
| 250 | (let ((kana2 (skkdic-get-entry | 247 | (let ((kana2 (skkdic-get-entry |
| 251 | (substring str from (+ from skkdic-jbytes)) | 248 | (substring str from (1+ from)) |
| 252 | skkdic-prefix-list))) | 249 | skkdic-prefix-list))) |
| 253 | (and (stringp kana2) | 250 | (and (stringp kana2) |
| 254 | (eq (string-match kana2 kana) 0))) | 251 | (eq (string-match kana2 kana) 0))) |
| 255 | (skkdic-breakup-string skkbuf kana str (+ from skkdic-jbytes) to)) | 252 | (skkdic-breakup-string skkbuf kana str (1+ from) to)) |
| 256 | (and (not first) | 253 | (and (not first) |
| 257 | (>= len skkdic-jbytes) | 254 | (>= len 1) |
| 258 | (let ((kana2-list (skkdic-get-entry | 255 | (let ((kana2-list (skkdic-get-entry |
| 259 | (substring str from to) | 256 | (substring str from to) |
| 260 | skkdic-postfix-list))) | 257 | skkdic-postfix-list))) |
| @@ -275,7 +272,7 @@ | |||
| 275 | (let (elt l) | 272 | (let (elt l) |
| 276 | (while candidates | 273 | (while candidates |
| 277 | (setq elt (car candidates)) | 274 | (setq elt (car candidates)) |
| 278 | (if (or (= (length elt) skkdic-jbytes) | 275 | (if (or (= (length elt) 1) |
| 279 | (and (string-match "^\\cj" elt) | 276 | (and (string-match "^\\cj" elt) |
| 280 | (not (skkdic-breakup-string skkbuf kana elt 0 (length elt) | 277 | (not (skkdic-breakup-string skkbuf kana elt 0 (length elt) |
| 281 | 'first)))) | 278 | 'first)))) |
| @@ -463,18 +460,18 @@ To get complete usage, invoke: | |||
| 463 | 460 | ||
| 464 | (defun skkdic-get-kana-compact-codes (kana) | 461 | (defun skkdic-get-kana-compact-codes (kana) |
| 465 | (let* ((len (length kana)) | 462 | (let* ((len (length kana)) |
| 466 | (vec (make-vector (/ (+ len (1- skkdic-jbytes)) skkdic-jbytes) 0)) | 463 | (vec (make-vector len 0)) |
| 467 | (i 0) | 464 | (i 0) |
| 468 | ch) | 465 | ch) |
| 469 | (while (< i len) | 466 | (while (< i len) |
| 470 | (setq ch (sref kana i)) | 467 | (setq ch (aref kana i)) |
| 471 | (aset vec (/ i 3) | 468 | (aset vec i |
| 472 | (if (< ch 128) ; CH is an ASCII letter for OKURIGANA, | 469 | (if (< ch 128) ; CH is an ASCII letter for OKURIGANA, |
| 473 | (- ch) ; represented by a negative code. | 470 | (- ch) ; represented by a negative code. |
| 474 | (if (= ch ?$B!<(B) ; `$B!<(B' is represented by 0. | 471 | (if (= ch ?$B!<(B) ; `$B!<(B' is represented by 0. |
| 475 | 0 | 472 | 0 |
| 476 | (- (nth 2 (split-char ch)) 32)))) | 473 | (- (nth 2 (split-char ch)) 32)))) |
| 477 | (setq i (+ i 3))) | 474 | (setq i (1+ i))) |
| 478 | vec)) | 475 | vec)) |
| 479 | 476 | ||
| 480 | (defun skkdic-extract-conversion-data (entry) | 477 | (defun skkdic-extract-conversion-data (entry) |
diff --git a/lisp/international/skkdic-utl.el b/lisp/international/skkdic-utl.el index c6750ab1683..a0f622bd924 100644 --- a/lisp/international/skkdic-utl.el +++ b/lisp/international/skkdic-utl.el | |||
| @@ -71,11 +71,8 @@ | |||
| 71 | ) | 71 | ) |
| 72 | "Alist of Okuriganas vs trailing ASCII letters in OKURI-ARI entry.") | 72 | "Alist of Okuriganas vs trailing ASCII letters in OKURI-ARI entry.") |
| 73 | 73 | ||
| 74 | (defconst skkdic-jbytes | ||
| 75 | (charset-bytes 'japanese-jisx0208)) | ||
| 76 | |||
| 77 | (defun skkdic-merge-head-and-tail (heads tails postfix) | 74 | (defun skkdic-merge-head-and-tail (heads tails postfix) |
| 78 | (let ((min-len (* skkdic-jbytes 2)) | 75 | (let ((min-len 2) |
| 79 | l) | 76 | l) |
| 80 | (while heads | 77 | (while heads |
| 81 | (if (or (not postfix) | 78 | (if (or (not postfix) |