changeset 29454:f0dee30140f0

(non-iso-charset-alist): Specify translation table symbol instead of translation table itself. (list-block-of-chars): CHARSET may be a translation table symbol.
author Kenichi Handa <handa@m17n.org>
date Tue, 06 Jun 2000 02:10:42 +0000
parents 22f8105a7dc7
children 31011bd2d2f0
files lisp/international/mule-diag.el
diffstat 1 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-diag.el	Tue Jun 06 02:10:04 2000 +0000
+++ b/lisp/international/mule-diag.el	Tue Jun 06 02:10:42 2000 +0000
@@ -241,15 +241,15 @@
 (defvar non-iso-charset-alist
   `((viscii
      (ascii vietnamese-viscii-lower vietnamese-viscii-upper)
-     ,viet-viscii-nonascii-translation-table
+     viet-viscii-nonascii-translation-table
      ((0 255)))
     (koi8-r
      (ascii cyrillic-iso8859-5)
-     ,cyrillic-koi8-r-nonascii-translation-table
+     cyrillic-koi8-r-nonascii-translation-table
      ((32 255)))
     (alternativnyj
      (ascii cyrillic-iso8859-5)
-     ,cyrillic-alternativnyj-nonascii-translation-table
+     cyrillic-alternativnyj-nonascii-translation-table
      ((32 255)))
     (big5
      (ascii chinese-big5-1 chinese-big5-2)
@@ -274,10 +274,10 @@
 CHARSET-LIST is a list of Emacs' charsets into which characters of
 NON-ISO-CHARSET are mapped.
 
-TRANSLATION-METHOD is a char-table to translate a character code of
-NON-ISO-CHARSET to the corresponding Emacs character code.  It can
-also be a function to call with one argument, a character code in
-NON-ISO-CHARSET.
+TRANSLATION-METHOD is a translatin table (symbol) to translate a
+character code of NON-ISO-CHARSET to the corresponding Emacs character
+code.  It can also be a function to call with one argument, a
+character code in NON-ISO-CHARSET.
 
 CODE-RANGE specifies the valid code ranges of NON-ISO-CHARSET.
 It is a list of RANGEs, where each RANGE is of the form:
@@ -353,8 +353,9 @@
 ;; of CHARSET is two (i.e. 2-byte charset), ROW is the first byte
 ;; (block index) of the characters, and MIN and MAX are the second
 ;; bytes of the characters.  If the dimension is one, ROW should be 0.
-;; For a non-ISO charset, CHARSET is a char-table or a function to get
-;; Emacs' character codes that corresponds to the characters to list.
+;; For a non-ISO charset, CHARSET is a translation table (symbol) or a
+;; function to get Emacs' character codes that corresponds to the
+;; characters to list.
 
 (defun list-block-of-chars (charset row min max)
   (let (i ch)
@@ -374,8 +375,8 @@
 		      (if (= row 0)
 			  (make-char charset i)
 			(make-char charset row i)))
-		     ((char-table-p charset)
-		      (aref charset i))
+		     ((and (symbolp charset) (get charset 'translation-table))
+		      (aref (get charset 'translation-table) i))
 		     (t (funcall charset (+ (* row 256) i)))))
       (if (and (char-table-p charset)
 	       (or (< ch 32) (and (>= ch 127) (<= ch 255))))