From: Kenichi Handa Date: Thu, 27 Jul 2000 06:22:42 +0000 (+0000) Subject: (cyrillic-koi8): Use `safe-chars' property instead of `safe-charsets'. X-Git-Tag: emacs-pretest-21.0.90~2576 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=53a1db8067165cd7dec8087aae276ba7b2890ae7;p=emacs.git (cyrillic-koi8): Use `safe-chars' property instead of `safe-charsets'. (cyrillic-alternativnyj): Likewise. (ccl-encode-alternativnyj): Don't check the charset cyrillic-iso8859-5. --- diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el index e81698c3550..63810434f47 100644 --- a/lisp/language/cyrillic.el +++ b/lisp/language/cyrillic.el @@ -112,7 +112,12 @@ ;; will have to forgive us. ?R "KOI8 8-bit encoding for Cyrillic (MIME: KOI8-R)" '(ccl-decode-koi8 . ccl-encode-koi8) - '((safe-charsets ascii cyrillic-iso8859-5) + `((safe-chars . ,(let ((table (make-char-table 'safe-chars)) + (i 0)) + (while (< i 256) + (aset table (aref cyrillic-koi8-r-decode-table i) t) + (setq i (1+ i))) + table)) (mime-charset . koi8-r) (valid-codes (0 . 127) 163 179 (192 . 255)) (charset-origin-alist (cyrillic-iso8859-5 "KOI8-R" @@ -190,8 +195,7 @@ `(1 ((loop (read-multibyte-character r0 r1) - (if (r0 == ,(charset-id 'cyrillic-iso8859-5)) - (translate-character cyrillic-alternativnyj-encode-table r0 r1)) + (translate-character cyrillic-alternativnyj-encode-table r0 r1) (write-repeat r1)))) "CCL program to encode Alternativnyj.") @@ -199,7 +203,13 @@ 'cyrillic-alternativnyj 4 ?A "ALTERNATIVNYJ 8-bit encoding for Cyrillic" '(ccl-decode-alternativnyj . ccl-encode-alternativnyj) - '((safe-charsets ascii cyrillic-iso8859-5) + `((safe-chars . ,(let ((table (make-char-table 'safe-chars)) + (i 0)) + (while (< i 256) + (aset table (aref cyrillic-alternativnyj-decode-table i) + t) + (setq i (1+ i))) + table)) (valid-codes (0 . 175) (224 . 241) 255) (charset-origin-alist (cyrillic-iso8859-5 "ALTERNATIVNYJ" cyrillic-encode-koi8-r-char))))