diff options
| author | Kenichi Handa | 2003-12-29 07:10:51 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2003-12-29 07:10:51 +0000 |
| commit | fd1627248f348adf60b3473999d540ef5d4fbafe (patch) | |
| tree | 11c076aa41f61f069c753242b48e3473cdfa556b | |
| parent | 0077e394d5eb006788f648ea27da8139ad89d539 (diff) | |
| download | emacs-fd1627248f348adf60b3473999d540ef5d4fbafe.tar.gz emacs-fd1627248f348adf60b3473999d540ef5d4fbafe.zip | |
(ccl-encode-koi8-font): Make it work for
characters of mule-unicode-0100-24ff.
(ccl-encode-windows-1251-font): New CCL program.
("Bulgarian"): Specify overriding-fontspec.
("Belarusian"): Likewise.
| -rw-r--r-- | lisp/language/cyrillic.el | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el index 19ff671834b..60ebf52fe35 100644 --- a/lisp/language/cyrillic.el +++ b/lisp/language/cyrillic.el | |||
| @@ -204,6 +204,9 @@ This works whether or not the table is Unicode-based or | |||
| 204 | ;; The table is set up later to encode both Unicode and 8859-5. | 204 | ;; The table is set up later to encode both Unicode and 8859-5. |
| 205 | (define-ccl-program ccl-encode-koi8-font | 205 | (define-ccl-program ccl-encode-koi8-font |
| 206 | `(0 | 206 | `(0 |
| 207 | (if (r2 >= 0) | ||
| 208 | ((r1 <<= 7) | ||
| 209 | (r1 += r2))) | ||
| 207 | (translate-character cyrillic-koi8-r-encode-table r0 r1)) | 210 | (translate-character cyrillic-koi8-r-encode-table r0 r1)) |
| 208 | "CCL program to encode Cyrillic chars to KOI font.") | 211 | "CCL program to encode Cyrillic chars to KOI font.") |
| 209 | 212 | ||
| @@ -472,10 +475,25 @@ Support for Russian using koi8-r and the russian-computer input method.") | |||
| 472 | (setcdr slot (cdr elt)) | 475 | (setcdr slot (cdr elt)) |
| 473 | (push elt ctext-non-standard-encodings-alist))) | 476 | (push elt ctext-non-standard-encodings-alist))) |
| 474 | 477 | ||
| 478 | (define-ccl-program ccl-encode-windows-1251-font | ||
| 479 | '(0 | ||
| 480 | ((r1 <<= 7) | ||
| 481 | (r1 += r2) | ||
| 482 | (translate-character encode-windows-1251 r0 r1) | ||
| 483 | ))) | ||
| 484 | |||
| 485 | (add-to-list 'font-ccl-encoder-alist | ||
| 486 | '("microsoft-cp1251" . ccl-encode-windows-1251-font)) | ||
| 487 | |||
| 475 | (set-language-info-alist | 488 | (set-language-info-alist |
| 476 | "Bulgarian" `((coding-system windows-1251) | 489 | "Bulgarian" `((coding-system windows-1251) |
| 477 | (coding-priority windows-1251) | 490 | (coding-priority windows-1251) |
| 478 | (ctext-non-standard-encodings "microsoft-cp1251") | 491 | (ctext-non-standard-encodings "microsoft-cp1251") |
| 492 | (overriding-fontspec | ||
| 493 | (,(get 'encode-windows-1251 'translation-table) | ||
| 494 | . (nil . "microsoft-cp1251")) | ||
| 495 | (,(get 'cyrillic-koi8-r-encode-table 'translation-table) | ||
| 496 | . (nil . "koi8-r"))) | ||
| 479 | (nonascii-translation | 497 | (nonascii-translation |
| 480 | . ,(get 'decode-windows-1251 'translation-table)) | 498 | . ,(get 'decode-windows-1251 'translation-table)) |
| 481 | (input-method . "bulgarian-bds") | 499 | (input-method . "bulgarian-bds") |
| @@ -488,6 +506,11 @@ Support for Russian using koi8-r and the russian-computer input method.") | |||
| 488 | "Belarusian" `((coding-system windows-1251) | 506 | "Belarusian" `((coding-system windows-1251) |
| 489 | (coding-priority windows-1251) | 507 | (coding-priority windows-1251) |
| 490 | (ctext-non-standard-encodings "microsoft-cp1251") | 508 | (ctext-non-standard-encodings "microsoft-cp1251") |
| 509 | (overriding-fontspec | ||
| 510 | (,(get 'encode-windows-1251 'translation-table) | ||
| 511 | . (nil . "microsoft-cp1251")) | ||
| 512 | (,(get 'cyrillic-koi8-r-encode-table 'translation-table) | ||
| 513 | . (nil . "koi8-r"))) | ||
| 491 | (nonascii-translation | 514 | (nonascii-translation |
| 492 | . ,(get 'decode-windows-1251 'translation-table)) | 515 | . ,(get 'decode-windows-1251 'translation-table)) |
| 493 | (input-method . "belarusian") | 516 | (input-method . "belarusian") |