Mercurial > emacs
comparison lisp/international/mule-diag.el @ 47605:22df356e38df
(list-character-sets): List also indirectly supported character sets.
(non-iso-charset-alist): Add mapped charset list for `mac-roman'.
(sort-listed-character-sets): Don't alter the region showing
indirectly supported charsets.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 25 Sep 2002 08:52:30 +0000 |
parents | 28c9630ee23e |
children | 1fcba19c7ae3 |
comparison
equal
deleted
inserted
replaced
47604:4d979a2a3934 | 47605:22df356e38df |
---|---|
87 (with-output-to-temp-buffer "*Character Set List*" | 87 (with-output-to-temp-buffer "*Character Set List*" |
88 (with-current-buffer standard-output | 88 (with-current-buffer standard-output |
89 (if arg | 89 (if arg |
90 (list-character-sets-2) | 90 (list-character-sets-2) |
91 ;; Insert header. | 91 ;; Insert header. |
92 (insert "Indirectly supported character sets are shown below.\n") | |
92 (insert | 93 (insert |
93 (substitute-command-keys | 94 (substitute-command-keys |
94 (concat "Use " | 95 (concat "Use " |
95 (if (display-mouse-p) "\\[help-follow-mouse] or ") | 96 (if (display-mouse-p) "\\[help-follow-mouse] or ") |
96 "\\[help-follow]:\n"))) | 97 "\\[help-follow]:\n"))) |
115 (setq columns (cdr columns))) | 116 (setq columns (cdr columns))) |
116 (insert "\n")) | 117 (insert "\n")) |
117 (insert "------\t------------\t\t\t--------------\t- -- ----------\n") | 118 (insert "------\t------------\t\t\t--------------\t- -- ----------\n") |
118 | 119 |
119 ;; Insert body sorted by charset IDs. | 120 ;; Insert body sorted by charset IDs. |
120 (list-character-sets-1 'id))))) | 121 (list-character-sets-1 'id) |
122 | |
123 ;; Insert non-directly-supported charsets. | |
124 (insert-char ?- 72) | |
125 (insert "\n\nINDIRECTLY SUPPORTED CHARSETS SETS:\n\n" | |
126 (propertize "CHARSET NAME\tMAPPED TO" 'face 'bold) | |
127 "\n------------\t---------\n") | |
128 (dolist (elt non-iso-charset-alist) | |
129 (insert-text-button (symbol-name (car elt)) | |
130 :type 'list-charset-chars | |
131 'help-args (list (car elt))) | |
132 (indent-to 16) | |
133 (dolist (e (nth 1 elt)) | |
134 (when (>= (+ (current-column) 1 (string-width (symbol-name e))) | |
135 ;; This is an approximate value. We don't know | |
136 ;; the correct window width of this buffer yet. | |
137 78) | |
138 (insert "\n") | |
139 (indent-to 16)) | |
140 | |
141 (insert (format "%s " e))) | |
142 (insert "\n")))))) | |
121 | 143 |
122 (defun sort-listed-character-sets (sort-key) | 144 (defun sort-listed-character-sets (sort-key) |
123 (if sort-key | 145 (if sort-key |
124 (save-excursion | 146 (save-excursion |
125 (help-setup-xref (list #'list-character-sets nil) t) | 147 (help-setup-xref (list #'list-character-sets nil) t) |
126 (let ((buffer-read-only nil)) | 148 (let ((buffer-read-only nil)) |
127 (goto-char (point-min)) | 149 (goto-char (point-min)) |
128 (re-search-forward "[0-9][0-9][0-9]") | 150 (re-search-forward "[0-9][0-9][0-9]") |
129 (beginning-of-line) | 151 (beginning-of-line) |
130 (delete-region (point) (point-max)) | 152 (let ((pos (point))) |
131 (list-character-sets-1 sort-key))))) | 153 (search-forward "----------") |
154 (beginning-of-line) | |
155 (save-restriction | |
156 (narrow-to-region pos (point)) | |
157 (delete-region (point-min) (point-max)) | |
158 (list-character-sets-1 sort-key))))))) | |
132 | 159 |
133 (defun charset-multibyte-form-string (charset) | 160 (defun charset-multibyte-form-string (charset) |
134 (let ((info (charset-info charset))) | 161 (let ((info (charset-info charset))) |
135 (cond ((eq charset 'ascii) | 162 (cond ((eq charset 'ascii) |
136 "xx") | 163 "xx") |
247 (charset-iso-graphic-plane charset) | 274 (charset-iso-graphic-plane charset) |
248 (charset-description charset)))))) | 275 (charset-description charset)))))) |
249 | 276 |
250 (defvar non-iso-charset-alist | 277 (defvar non-iso-charset-alist |
251 `((mac-roman | 278 `((mac-roman |
252 nil | 279 (ascii latin-iso8859-1 mule-unicode-2500-33ff |
280 mule-unicode-0100-24ff mule-unicode-e000-ffff) | |
253 mac-roman-decoder | 281 mac-roman-decoder |
254 ((0 255))) | 282 ((0 255))) |
255 (viscii | 283 (viscii |
256 (ascii vietnamese-viscii-lower vietnamese-viscii-upper) | 284 (ascii vietnamese-viscii-lower vietnamese-viscii-upper) |
257 viet-viscii-nonascii-translation-table | 285 viet-viscii-nonascii-translation-table |