Mercurial > emacs
comparison lisp/international/mule-diag.el @ 27973:cf535f97695d
(list-character-sets): Make help-echo
string by substitute-command-keys.
(list-character-sets): Likewise.
(sort-listed-character-sets): Call help-setup-xref.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 03 Mar 2000 04:17:09 +0000 |
parents | 8b485e43ac51 |
children | cad26a9da36b |
comparison
equal
deleted
inserted
replaced
27972:e6198d7dd932 | 27973:cf535f97695d |
---|---|
68 (if arg | 68 (if arg |
69 (list-character-sets-2) | 69 (list-character-sets-2) |
70 ;; Insert header. | 70 ;; Insert header. |
71 (insert | 71 (insert |
72 (substitute-command-keys | 72 (substitute-command-keys |
73 (concat | 73 (concat "Use " |
74 "Use " | 74 (if (display-mouse-p) "\\[help-follow-mouse] or ") |
75 (if (display-mouse-p) "\\[help-follow-mouse] or ") | 75 "\\[help-follow]:\n"))) |
76 "\\[help-follow] on a title of column\nto sort by that title."))) | 76 (insert " on a column title to sort by that title,") |
77 (indent-to 56) | 77 (indent-to 56) |
78 (insert "+----DIMENSION\n") | 78 (insert "+----DIMENSION\n") |
79 (insert " on a charset name to list characters.") | |
79 (indent-to 56) | 80 (indent-to 56) |
80 (insert "| +--CHARS\n") | 81 (insert "| +--CHARS\n") |
81 (let ((columns '(("ID-NUM" . id) "\t" | 82 (let ((columns '(("ID-NUM" . id) "\t" |
82 ("CHARSET-NAME" . name) "\t\t\t" | 83 ("CHARSET-NAME" . name) "\t\t\t" |
83 ("MULTIBYTE-FORM" . id) "\t" | 84 ("MULTIBYTE-FORM" . id) "\t" |
84 ("D CH FINAL-CHAR" . iso-spec))) | 85 ("D CH FINAL-CHAR" . iso-spec))) |
85 (help-highlight-face 'region) | 86 (help-highlight-face 'region) |
87 (help-echo | |
88 (substitute-command-keys | |
89 (concat (if (display-mouse-p) "\\[help-follow-mouse], ") | |
90 "\\[help-follow]: sort on this column"))) | |
86 pos) | 91 pos) |
87 (while columns | 92 (while columns |
88 (if (stringp (car columns)) | 93 (if (stringp (car columns)) |
89 (insert (car columns)) | 94 (insert (car columns)) |
90 (insert (car (car columns))) | 95 (insert (car (car columns))) |
91 (search-backward (car (car columns))) | 96 (search-backward (car (car columns))) |
92 (help-xref-button 0 'sort-listed-character-sets | 97 (help-xref-button 0 'sort-listed-character-sets |
93 (cdr (car columns)) | 98 (cdr (car columns)) |
94 "mouse-2, C-c: sort on this column") | 99 help-echo) |
95 (goto-char (point-max))) | 100 (goto-char (point-max))) |
96 (setq columns (cdr columns))) | 101 (setq columns (cdr columns))) |
97 (insert "\n")) | 102 (insert "\n")) |
98 (insert "------\t------------\t\t\t--------------\t- -- ----------\n") | 103 (insert "------\t------------\t\t\t--------------\t- -- ----------\n") |
99 | 104 |
110 (let ((buffer-read-only nil)) | 115 (let ((buffer-read-only nil)) |
111 (goto-char (point-min)) | 116 (goto-char (point-min)) |
112 (re-search-forward "[0-9][0-9][0-9]") | 117 (re-search-forward "[0-9][0-9][0-9]") |
113 (beginning-of-line) | 118 (beginning-of-line) |
114 (delete-region (point) (point-max)) | 119 (delete-region (point) (point-max)) |
115 (list-character-sets-1 sort-key))))) | 120 (list-character-sets-1 sort-key) |
116 | 121 (help-setup-xref (list #'list-character-sets nil) t))))) |
117 | 122 |
118 ;; Insert a list of character sets sorted by SORT-KEY. SORT-KEY | 123 ;; Insert a list of character sets sorted by SORT-KEY. SORT-KEY |
119 ;; should be one of `id', `name', and `iso-spec'. If SORT-KEY is nil, | 124 ;; should be one of `id', `name', and `iso-spec'. If SORT-KEY is nil, |
120 ;; it defaults to `id'. | 125 ;; it defaults to `id'. |
121 | 126 |
122 (defun list-character-sets-1 (sort-key) | 127 (defun list-character-sets-1 (sort-key) |
123 (or sort-key | 128 (or sort-key |
124 (setq sort-key 'id)) | 129 (setq sort-key 'id)) |
125 (let ((tail (charset-list)) | 130 (let ((tail (charset-list)) |
131 (help-echo | |
132 (substitute-command-keys | |
133 (concat (if (display-mouse-p) "\\[help-follow-mouse], ") | |
134 "\\[help-follow]: show table of this character set"))) | |
126 charset-info-list elt charset info sort-func) | 135 charset-info-list elt charset info sort-func) |
127 (while tail | 136 (while tail |
128 (setq charset (car tail) tail (cdr tail) | 137 (setq charset (car tail) tail (cdr tail) |
129 info (charset-info charset)) | 138 info (charset-info charset)) |
130 | 139 |
175 charset-info-list (cdr charset-info-list)) | 184 charset-info-list (cdr charset-info-list)) |
176 (insert (format "%03d(%02X)" (car elt) (car elt))) ; ID-NUM | 185 (insert (format "%03d(%02X)" (car elt) (car elt))) ; ID-NUM |
177 (indent-to 8) | 186 (indent-to 8) |
178 (insert (symbol-name (nth 1 elt))) ; CHARSET-NAME | 187 (insert (symbol-name (nth 1 elt))) ; CHARSET-NAME |
179 (search-backward (symbol-name (nth 1 elt))) | 188 (search-backward (symbol-name (nth 1 elt))) |
180 (help-xref-button 0 'list-charset-chars (nth 1 elt) | 189 (help-xref-button 0 'list-charset-chars (nth 1 elt) help-echo) |
181 "mouse-2, RET: show table of this character set") | |
182 (goto-char (point-max)) | 190 (goto-char (point-max)) |
183 (insert "\t") | 191 (insert "\t") |
184 (indent-to 40) | 192 (indent-to 40) |
185 (insert (nth 2 elt)) ; MULTIBYTE-FORM | 193 (insert (nth 2 elt)) ; MULTIBYTE-FORM |
186 (indent-to 56) | 194 (indent-to 56) |