diff options
| author | Dave Love | 2003-09-04 16:58:20 +0000 |
|---|---|---|
| committer | Dave Love | 2003-09-04 16:58:20 +0000 |
| commit | 0a1a08dde387c22ef9f96a0c20b9cbc578f378fb (patch) | |
| tree | 39fcf9cfb4186714186fbe7fe8d37e09c7b91ecd | |
| parent | 25025a75fec2cb6d34979b985d56222f60caf524 (diff) | |
| download | emacs-0a1a08dde387c22ef9f96a0c20b9cbc578f378fb.tar.gz emacs-0a1a08dde387c22ef9f96a0c20b9cbc578f378fb.zip | |
(non-iso-charset-alist): Define as
nil.
(top-level): Append to non-iso-charset-alist (without `codepage'
stuff).
(print-designation, list-coding-systems-1): Output fixes.
| -rw-r--r-- | lisp/international/mule-diag.el | 105 |
1 files changed, 45 insertions, 60 deletions
diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index bbfa2540f5d..8cabca02dcf 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el | |||
| @@ -62,42 +62,7 @@ | |||
| 62 | 'help-echo "mouse-2, RET: show table of characters for this character set") | 62 | 'help-echo "mouse-2, RET: show table of characters for this character set") |
| 63 | 63 | ||
| 64 | ;;;###autoload | 64 | ;;;###autoload |
| 65 | (defvar non-iso-charset-alist | 65 | (defvar non-iso-charset-alist nil |
| 66 | `((mac-roman | ||
| 67 | (ascii latin-iso8859-1 mule-unicode-2500-33ff | ||
| 68 | mule-unicode-0100-24ff mule-unicode-e000-ffff) | ||
| 69 | mac-roman-decoder | ||
| 70 | ((0 255))) | ||
| 71 | (viscii | ||
| 72 | (ascii vietnamese-viscii-lower vietnamese-viscii-upper) | ||
| 73 | viet-viscii-nonascii-translation-table | ||
| 74 | ((0 255))) | ||
| 75 | (vietnamese-tcvn | ||
| 76 | (ascii vietnamese-viscii-lower vietnamese-viscii-upper) | ||
| 77 | viet-tcvn-nonascii-translation-table | ||
| 78 | ((0 255))) | ||
| 79 | (koi8-r | ||
| 80 | (ascii cyrillic-iso8859-5) | ||
| 81 | cyrillic-koi8-r-nonascii-translation-table | ||
| 82 | ((32 255))) | ||
| 83 | (alternativnyj | ||
| 84 | (ascii cyrillic-iso8859-5) | ||
| 85 | cyrillic-alternativnyj-nonascii-translation-table | ||
| 86 | ((32 255))) | ||
| 87 | (koi8-u | ||
| 88 | (ascii cyrillic-iso8859-5 mule-unicode-0100-24ff) | ||
| 89 | cyrillic-koi8-u-nonascii-translation-table | ||
| 90 | ((32 255))) | ||
| 91 | (big5 | ||
| 92 | (ascii chinese-big5-1 chinese-big5-2) | ||
| 93 | decode-big5-char | ||
| 94 | ((32 127) | ||
| 95 | ((?\xA1 ?\xFE) . (?\x40 ?\x7E ?\xA1 ?\xFE)))) | ||
| 96 | (sjis | ||
| 97 | (ascii katakana-jisx0201 japanese-jisx0208) | ||
| 98 | decode-sjis-char | ||
| 99 | ((32 127 ?\xA1 ?\xDF) | ||
| 100 | ((?\x81 ?\x9F ?\xE0 ?\xEF) . (?\x40 ?\x7E ?\x80 ?\xFC))))) | ||
| 101 | "Alist of charset names vs the corresponding information. | 66 | "Alist of charset names vs the corresponding information. |
| 102 | This is mis-named for historical reasons. The charsets are actually | 67 | This is mis-named for historical reasons. The charsets are actually |
| 103 | non-built-in ones. They correspond to Emacs coding systems, not Emacs | 68 | non-built-in ones. They correspond to Emacs coding systems, not Emacs |
| @@ -128,6 +93,47 @@ TO2, or... | |||
| 128 | The second form is used for 2-byte codes. The car part is the ranges | 93 | The second form is used for 2-byte codes. The car part is the ranges |
| 129 | of the first byte, and the cdr part is the ranges of the second byte.") | 94 | of the first byte, and the cdr part is the ranges of the second byte.") |
| 130 | 95 | ||
| 96 | ;; Set it like this in case code-pages &c has been loaded previously, | ||
| 97 | ;; in which case defvar would be useless. | ||
| 98 | (setq non-iso-charset-alist | ||
| 99 | (append | ||
| 100 | non-iso-charset-alist | ||
| 101 | `((mac-roman | ||
| 102 | (ascii latin-iso8859-1 mule-unicode-2500-33ff | ||
| 103 | mule-unicode-0100-24ff mule-unicode-e000-ffff) | ||
| 104 | mac-roman-decoder | ||
| 105 | ((0 255))) | ||
| 106 | (viscii | ||
| 107 | (ascii vietnamese-viscii-lower vietnamese-viscii-upper) | ||
| 108 | viet-viscii-nonascii-translation-table | ||
| 109 | ((0 255))) | ||
| 110 | (vietnamese-tcvn | ||
| 111 | (ascii vietnamese-viscii-lower vietnamese-viscii-upper) | ||
| 112 | viet-tcvn-nonascii-translation-table | ||
| 113 | ((0 255))) | ||
| 114 | (koi8-r | ||
| 115 | (ascii cyrillic-iso8859-5) | ||
| 116 | cyrillic-koi8-r-nonascii-translation-table | ||
| 117 | ((32 255))) | ||
| 118 | (alternativnyj | ||
| 119 | (ascii cyrillic-iso8859-5) | ||
| 120 | cyrillic-alternativnyj-nonascii-translation-table | ||
| 121 | ((32 255))) | ||
| 122 | (koi8-u | ||
| 123 | (ascii cyrillic-iso8859-5 mule-unicode-0100-24ff) | ||
| 124 | cyrillic-koi8-u-nonascii-translation-table | ||
| 125 | ((32 255))) | ||
| 126 | (big5 | ||
| 127 | (ascii chinese-big5-1 chinese-big5-2) | ||
| 128 | decode-big5-char | ||
| 129 | ((32 127) | ||
| 130 | ((?\xA1 ?\xFE) . (?\x40 ?\x7E ?\xA1 ?\xFE)))) | ||
| 131 | (sjis | ||
| 132 | (ascii katakana-jisx0201 japanese-jisx0208) | ||
| 133 | decode-sjis-char | ||
| 134 | ((32 127 ?\xA1 ?\xDF) | ||
| 135 | ((?\x81 ?\x9F ?\xE0 ?\xEF) . (?\x40 ?\x7E ?\x80 ?\xFC))))))) | ||
| 136 | |||
| 131 | ;;;###autoload | 137 | ;;;###autoload |
| 132 | (defun list-character-sets (arg) | 138 | (defun list-character-sets (arg) |
| 133 | "Display a list of all character sets. | 139 | "Display a list of all character sets. |
| @@ -350,27 +356,6 @@ coding system cpCODEPAGE." | |||
| 350 | (string-to-char | 356 | (string-to-char |
| 351 | (decode-coding-string (char-to-string code) coding-system)))) | 357 | (decode-coding-string (char-to-string code) coding-system)))) |
| 352 | 358 | ||
| 353 | |||
| 354 | ;; Add DOS codepages to `non-iso-charset-alist'. | ||
| 355 | |||
| 356 | (let ((tail (cp-supported-codepages)) | ||
| 357 | elt) | ||
| 358 | (while tail | ||
| 359 | (setq elt (car tail) tail (cdr tail)) | ||
| 360 | ;; Now ELT is (CODEPAGE . CHARSET), where CODEPAGE is a string | ||
| 361 | ;; (e.g. "850"), CHARSET is a charset that characters in CODEPAGE | ||
| 362 | ;; are mapped to. | ||
| 363 | (unless (assq (intern (concat "cp" (car elt))) non-iso-charset-alist) | ||
| 364 | (setq non-iso-charset-alist | ||
| 365 | (cons (list (intern (concat "cp" (car elt))) | ||
| 366 | (list 'ascii (cdr elt)) | ||
| 367 | `(lambda (code) | ||
| 368 | (decode-codepage-char ,(string-to-int (car elt)) | ||
| 369 | code)) | ||
| 370 | (list (list 0 255))) | ||
| 371 | non-iso-charset-alist))))) | ||
| 372 | |||
| 373 | |||
| 374 | ;; A variable to hold charset input history. | 359 | ;; A variable to hold charset input history. |
| 375 | (defvar charset-history nil) | 360 | (defvar charset-history nil) |
| 376 | 361 | ||
| @@ -594,10 +579,10 @@ PC `codepages' and other coded character sets. See `non-iso-charset-alist'." | |||
| 594 | charset (charset-description charset))) | 579 | charset (charset-description charset))) |
| 595 | ((listp charset) | 580 | ((listp charset) |
| 596 | (if (charsetp (car charset)) | 581 | (if (charsetp (car charset)) |
| 597 | (format "%s:%s, and also used by the followings:" | 582 | (format "%s:%s, and also used by the following:" |
| 598 | (car charset) | 583 | (car charset) |
| 599 | (charset-description (car charset))) | 584 | (charset-description (car charset))) |
| 600 | "no initial designation, and used by the followings:")) | 585 | "no initial designation, and used by the following:")) |
| 601 | (t | 586 | (t |
| 602 | "invalid designation information")))) | 587 | "invalid designation information")))) |
| 603 | (when (listp charset) | 588 | (when (listp charset) |
| @@ -1004,7 +989,7 @@ but still contains full information about each coding system." | |||
| 1004 | ## EOL = 0 (LF), 1 (CRLF), 2 (CR), or 3 (Automatic detection) | 989 | ## EOL = 0 (LF), 1 (CRLF), 2 (CR), or 3 (Automatic detection) |
| 1005 | ## FLAGS = | 990 | ## FLAGS = |
| 1006 | ## if TYPE = 2 then | 991 | ## if TYPE = 2 then |
| 1007 | ## comma (`,') separated data of the followings: | 992 | ## comma (`,') separated data of the following: |
| 1008 | ## G0, G1, G2, G3, SHORT-FORM, ASCII-EOL, ASCII-CNTL, SEVEN, | 993 | ## G0, G1, G2, G3, SHORT-FORM, ASCII-EOL, ASCII-CNTL, SEVEN, |
| 1009 | ## LOCKING-SHIFT, SINGLE-SHIFT, USE-ROMAN, USE-OLDJIS, NO-ISO6429 | 994 | ## LOCKING-SHIFT, SINGLE-SHIFT, USE-ROMAN, USE-OLDJIS, NO-ISO6429 |
| 1010 | ## else if TYPE = 4 then | 995 | ## else if TYPE = 4 then |