Mercurial > emacs
annotate lisp/international/mule-diag.el @ 27772:11a8d125f241
*** empty log message ***
author | Thien-Thi Nguyen <ttn@gnuvola.org> |
---|---|
date | Fri, 18 Feb 2000 23:35:24 +0000 |
parents | 1830bc1903fb |
children | ed26ed5b0afc |
rev | line source |
---|---|
24724
df2a95fa1429
(mule-diag): Change MULE to Mule in docstring.
Kenichi Handa <handa@m17n.org>
parents:
24691
diff
changeset
|
1 ;;; mule-diag.el --- Show diagnosis of multilingual environment (Mule) |
17052 | 2 |
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | |
18377
8b4a66c66dd6
Change copyright notice.
Richard M. Stallman <rms@gnu.org>
parents:
18300
diff
changeset
|
4 ;; Licensed to the Free Software Foundation. |
17052 | 5 |
6 ;; Keywords: multilingual, charset, coding system, fontset, diagnosis | |
7 | |
8 ;; This file is part of GNU Emacs. | |
9 | |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 ;; it under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
17071 | 21 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 ;; Boston, MA 02111-1307, USA. | |
17052 | 24 |
25 ;;; General utility function | |
26 | |
27 ;; Print all arguments with single space separator in one line. | |
28 (defun print-list (&rest args) | |
29 (while (cdr args) | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
30 (when (car args) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
31 (princ (car args)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
32 (princ " ")) |
17052 | 33 (setq args (cdr args))) |
34 (princ (car args)) | |
35 (princ "\n")) | |
36 | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
37 ;; Re-order the elements of charset-list. |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
38 (defun sort-charset-list () |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
39 (setq charset-list |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
40 (sort charset-list |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
41 (function (lambda (x y) (< (charset-id x) (charset-id y))))))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
42 |
17052 | 43 ;;; CHARSET |
44 | |
45 ;;;###autoload | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
46 (defun list-character-sets (&optional arg) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
47 "Display a list of all character sets. |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
48 |
22306 | 49 The ID column contains a charset identification number for internal Emacs use. |
50 The B column contains a number of bytes occupied in a buffer | |
51 by any character in this character set. | |
52 The W column contains a number of columns occupied on the screen | |
53 by any character in this character set. | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
54 |
22306 | 55 With prefix arg, the output format gets more cryptic, |
56 but still shows the full information." | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
57 (interactive "P") |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
58 (sort-charset-list) |
17052 | 59 (with-output-to-temp-buffer "*Help*" |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
60 (save-excursion |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
61 (set-buffer standard-output) |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
62 (list-character-sets-1 arg) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
63 (help-mode) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
64 (setq truncate-lines t)))) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
65 |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
66 (defun list-character-sets-1 (arg) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
67 (let ((l charset-list) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
68 charset) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
69 (if (null arg) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
70 (progn |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
71 (insert "ID Name B W Description\n") |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
72 (insert "-- ---- - - -----------\n") |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
73 (while l |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
74 (setq charset (car l) l (cdr l)) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
75 (insert (format "%03d %s" (charset-id charset) charset)) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
76 (indent-to 28) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
77 (insert (format "%d %d %s\n" |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
78 (charset-bytes charset) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
79 (charset-width charset) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
80 (charset-description charset))))) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
81 (insert "\ |
17052 | 82 ######################### |
83 ## LIST OF CHARSETS | |
84 ## Each line corresponds to one charset. | |
85 ## The following attributes are listed in this order | |
86 ## separated by a colon `:' in one line. | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
87 ## CHARSET-ID, |
17052 | 88 ## CHARSET-SYMBOL-NAME, |
89 ## DIMENSION (1 or 2) | |
90 ## CHARS (94 or 96) | |
91 ## BYTES (of multibyte form: 1, 2, 3, or 4), | |
92 ## WIDTH (occupied column numbers: 1 or 2), | |
93 ## DIRECTION (0:left-to-right, 1:right-to-left), | |
94 ## ISO-FINAL-CHAR (character code of ISO-2022's final character) | |
95 ## ISO-GRAPHIC-PLANE (ISO-2022's graphic plane, 0:GL, 1:GR) | |
96 ## DESCRIPTION (describing string of the charset) | |
97 ") | |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
98 (while l |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
99 (setq charset (car l) l (cdr l)) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
100 (princ (format "%03d:%s:%d:%d:%d:%d:%d:%d:%d:%s\n" |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
101 (charset-id charset) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
102 charset |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
103 (charset-dimension charset) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
104 (charset-chars charset) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
105 (charset-bytes charset) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
106 (charset-width charset) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
107 (charset-direction charset) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
108 (charset-iso-final-char charset) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
109 (charset-iso-graphic-plane charset) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
110 (charset-description charset))))))) |
17052 | 111 |
112 ;;; CODING-SYSTEM | |
113 | |
114 ;; Print information of designation of each graphic register in FLAGS | |
115 ;; in human readable format. See the documentation of | |
116 ;; `make-coding-system' for the meaning of FLAGS. | |
117 (defun print-designation (flags) | |
118 (let ((graphic-register 0) | |
119 charset) | |
120 (while (< graphic-register 4) | |
121 (setq charset (aref flags graphic-register)) | |
122 (princ (format | |
123 " G%d -- %s\n" | |
124 graphic-register | |
125 (cond ((null charset) | |
126 "never used") | |
127 ((eq charset t) | |
128 "no initial designation, and used by any charsets") | |
129 ((symbolp charset) | |
130 (format "%s:%s" | |
131 charset (charset-description charset))) | |
132 ((listp charset) | |
133 (if (charsetp (car charset)) | |
134 (format "%s:%s, and also used by the followings:" | |
135 (car charset) | |
136 (charset-description (car charset))) | |
137 "no initial designation, and used by the followings:")) | |
138 (t | |
139 "invalid designation information")))) | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
140 (when (listp charset) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
141 (setq charset (cdr charset)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
142 (while charset |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
143 (cond ((eq (car charset) t) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
144 (princ "\tany other charsets\n")) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
145 ((charsetp (car charset)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
146 (princ (format "\t%s:%s\n" |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
147 (car charset) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
148 (charset-description (car charset))))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
149 (t |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
150 "invalid designation information")) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
151 (setq charset (cdr charset)))) |
17052 | 152 (setq graphic-register (1+ graphic-register))))) |
153 | |
154 ;;;###autoload | |
155 (defun describe-coding-system (coding-system) | |
22306 | 156 "Display information about CODING-SYSTEM." |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
157 (interactive "zDescribe coding system (default, current choices): ") |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
158 (if (null coding-system) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
159 (describe-current-coding-system) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
160 (with-output-to-temp-buffer "*Help*" |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
161 (print-coding-system-briefly coding-system 'doc-string) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
162 (let ((coding-spec (coding-system-spec coding-system))) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
163 (princ "Type: ") |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
164 (let ((type (coding-system-type coding-system)) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
165 (flags (coding-system-flags coding-system))) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
166 (princ type) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
167 (cond ((eq type nil) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
168 (princ " (do no conversion)")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
169 ((eq type t) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
170 (princ " (do automatic conversion)")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
171 ((eq type 0) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
172 (princ " (Emacs internal multibyte form)")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
173 ((eq type 1) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
174 (princ " (Shift-JIS, MS-KANJI)")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
175 ((eq type 2) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
176 (princ " (variant of ISO-2022)\n") |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
177 (princ "Initial designations:\n") |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
178 (print-designation flags) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
179 (princ "Other Form: \n ") |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
180 (princ (if (aref flags 4) "short-form" "long-form")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
181 (if (aref flags 5) (princ ", ASCII@EOL")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
182 (if (aref flags 6) (princ ", ASCII@CNTL")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
183 (princ (if (aref flags 7) ", 7-bit" ", 8-bit")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
184 (if (aref flags 8) (princ ", use-locking-shift")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
185 (if (aref flags 9) (princ ", use-single-shift")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
186 (if (aref flags 10) (princ ", use-roman")) |
23582
a96404fd053a
(describe-coding-system): Describe
Andreas Schwab <schwab@suse.de>
parents:
22885
diff
changeset
|
187 (if (aref flags 11) (princ ", use-old-jis")) |
a96404fd053a
(describe-coding-system): Describe
Andreas Schwab <schwab@suse.de>
parents:
22885
diff
changeset
|
188 (if (aref flags 12) (princ ", no-ISO6429")) |
a96404fd053a
(describe-coding-system): Describe
Andreas Schwab <schwab@suse.de>
parents:
22885
diff
changeset
|
189 (if (aref flags 13) (princ ", init-bol")) |
a96404fd053a
(describe-coding-system): Describe
Andreas Schwab <schwab@suse.de>
parents:
22885
diff
changeset
|
190 (if (aref flags 14) (princ ", designation-bol")) |
a96404fd053a
(describe-coding-system): Describe
Andreas Schwab <schwab@suse.de>
parents:
22885
diff
changeset
|
191 (if (aref flags 15) (princ ", convert-unsafe")) |
a96404fd053a
(describe-coding-system): Describe
Andreas Schwab <schwab@suse.de>
parents:
22885
diff
changeset
|
192 (if (aref flags 16) (princ ", accept-latin-extra-code")) |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
193 (princ ".")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
194 ((eq type 3) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
195 (princ " (Big5)")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
196 ((eq type 4) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
197 (princ " (do conversion by CCL program)")) |
19876
d3df40315378
(describe-coding-system): Describe coding systems of type 5, raw-text.
Richard M. Stallman <rms@gnu.org>
parents:
19657
diff
changeset
|
198 ((eq type 5) |
d3df40315378
(describe-coding-system): Describe coding systems of type 5, raw-text.
Richard M. Stallman <rms@gnu.org>
parents:
19657
diff
changeset
|
199 (princ " (text with random binary characters)")) |
d3df40315378
(describe-coding-system): Describe coding systems of type 5, raw-text.
Richard M. Stallman <rms@gnu.org>
parents:
19657
diff
changeset
|
200 (t (princ ": invalid coding-system.")))) |
20163
5ff1329561b4
(list-input-methods): Handle the case
Kenichi Handa <handa@m17n.org>
parents:
20114
diff
changeset
|
201 (princ "\nEOL type: ") |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
202 (let ((eol-type (coding-system-eol-type coding-system))) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
203 (cond ((vectorp eol-type) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
204 (princ "Automatic selection from:\n\t") |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
205 (princ eol-type) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
206 (princ "\n")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
207 ((or (null eol-type) (eq eol-type 0)) (princ "LF\n")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
208 ((eq eol-type 1) (princ "CRLF\n")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
209 ((eq eol-type 2) (princ "CR\n")) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
210 (t (princ "invalid\n"))))) |
20114
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
211 (let ((postread (coding-system-get coding-system 'post-read-conversion))) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
212 (when postread |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
213 (princ "After decoding a text normally,") |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
214 (princ " perform post-conversion by the function: ") |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
215 (princ "\n ") |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
216 (princ postread) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
217 (princ "\n"))) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
218 (let ((prewrite (coding-system-get coding-system 'pre-write-conversion))) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
219 (when prewrite |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
220 (princ "Before encoding a text normally,") |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
221 (princ " perform pre-conversion by the function: ") |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
222 (princ "\n ") |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
223 (princ prewrite) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
224 (princ "\n"))) |
20163
5ff1329561b4
(list-input-methods): Handle the case
Kenichi Handa <handa@m17n.org>
parents:
20114
diff
changeset
|
225 (let ((charsets (coding-system-get coding-system 'safe-charsets))) |
5ff1329561b4
(list-input-methods): Handle the case
Kenichi Handa <handa@m17n.org>
parents:
20114
diff
changeset
|
226 (when charsets |
20731
9fba656001e8
(describe-coding-system): Change the
Kenichi Handa <handa@m17n.org>
parents:
20170
diff
changeset
|
227 (if (eq charsets t) |
24691
0f6ca131ad9c
(describe-coding-system): Fix English message.
Kenichi Handa <handa@m17n.org>
parents:
24161
diff
changeset
|
228 (princ "This coding system can encode all charsets.\n") |
20731
9fba656001e8
(describe-coding-system): Change the
Kenichi Handa <handa@m17n.org>
parents:
20170
diff
changeset
|
229 (princ "This coding system encode the following charsets:\n") |
20163
5ff1329561b4
(list-input-methods): Handle the case
Kenichi Handa <handa@m17n.org>
parents:
20114
diff
changeset
|
230 (princ " ") |
20731
9fba656001e8
(describe-coding-system): Change the
Kenichi Handa <handa@m17n.org>
parents:
20170
diff
changeset
|
231 (while charsets |
9fba656001e8
(describe-coding-system): Change the
Kenichi Handa <handa@m17n.org>
parents:
20170
diff
changeset
|
232 (princ " ") |
9fba656001e8
(describe-coding-system): Change the
Kenichi Handa <handa@m17n.org>
parents:
20170
diff
changeset
|
233 (princ (car charsets)) |
9fba656001e8
(describe-coding-system): Change the
Kenichi Handa <handa@m17n.org>
parents:
20170
diff
changeset
|
234 (setq charsets (cdr charsets)))))) |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
235 (save-excursion |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
236 (set-buffer standard-output) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
237 (help-mode))))) |
17052 | 238 |
239 ;;;###autoload | |
240 (defun describe-current-coding-system-briefly () | |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
241 "Display coding systems currently used in a brief format in echo area. |
17052 | 242 |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
243 The format is \"F[..],K[..],T[..],P>[..],P<[..], default F[..],P<[..],P<[..]\", |
17052 | 244 where mnemonics of the following coding systems come in this order |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
245 at the place of `..': |
22306 | 246 `buffer-file-coding-system` (of the current buffer) |
17052 | 247 eol-type of buffer-file-coding-system (of the current buffer) |
22306 | 248 Value returned by `keyboard-coding-system' |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
249 eol-type of (keyboard-coding-system) |
22306 | 250 Value returned by `terminal-coding-system. |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
251 eol-type of (terminal-coding-system) |
22306 | 252 `process-coding-system' for read (of the current buffer, if any) |
17052 | 253 eol-type of process-coding-system for read (of the current buffer, if any) |
22306 | 254 `process-coding-system' for write (of the current buffer, if any) |
17052 | 255 eol-type of process-coding-system for write (of the current buffer, if any) |
22306 | 256 `default-buffer-file-coding-system' |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
257 eol-type of default-buffer-file-coding-system |
22306 | 258 `default-process-coding-system' for read |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
259 eol-type of default-process-coding-system for read |
22306 | 260 `default-process-coding-system' for write |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
261 eol-type of default-process-coding-system" |
17052 | 262 (interactive) |
263 (let* ((proc (get-buffer-process (current-buffer))) | |
264 (process-coding-systems (if proc (process-coding-system proc)))) | |
265 (message | |
24865
a4b8bb7bed21
(describe-current-coding-system-briefly): Fix format string.
Kenichi Handa <handa@m17n.org>
parents:
24724
diff
changeset
|
266 "F[%c%s],K[%c%s],T[%c%s],P>[%c%s],P<[%c%s], default F[%c%s],P>[%c%s],P<[%c%s]" |
17052 | 267 (coding-system-mnemonic buffer-file-coding-system) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
268 (coding-system-eol-type-mnemonic buffer-file-coding-system) |
17052 | 269 (coding-system-mnemonic (keyboard-coding-system)) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
270 (coding-system-eol-type-mnemonic (keyboard-coding-system)) |
17052 | 271 (coding-system-mnemonic (terminal-coding-system)) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
272 (coding-system-eol-type-mnemonic (terminal-coding-system)) |
17052 | 273 (coding-system-mnemonic (car process-coding-systems)) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
274 (coding-system-eol-type-mnemonic (car process-coding-systems)) |
17052 | 275 (coding-system-mnemonic (cdr process-coding-systems)) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
276 (coding-system-eol-type-mnemonic (cdr process-coding-systems)) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
277 (coding-system-mnemonic default-buffer-file-coding-system) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
278 (coding-system-eol-type-mnemonic default-buffer-file-coding-system) |
17052 | 279 (coding-system-mnemonic (car default-process-coding-system)) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
280 (coding-system-eol-type-mnemonic (car default-process-coding-system)) |
17052 | 281 (coding-system-mnemonic (cdr default-process-coding-system)) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
282 (coding-system-eol-type-mnemonic (cdr default-process-coding-system)) |
17052 | 283 ))) |
284 | |
22306 | 285 ;; Print symbol name and mnemonic letter of CODING-SYSTEM with `princ'. |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
286 (defun print-coding-system-briefly (coding-system &optional doc-string) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
287 (if (not coding-system) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
288 (princ "nil\n") |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
289 (princ (format "%c -- %s" |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
290 (coding-system-mnemonic coding-system) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
291 coding-system)) |
20114
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
292 (let ((aliases (coding-system-get coding-system 'alias-coding-systems))) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
293 (if (eq coding-system (car aliases)) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
294 (if (cdr aliases) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
295 (princ (format " %S" (cons 'alias: (cdr aliases))))) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
296 (if (memq coding-system aliases) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
297 (princ (format " (alias of %s)" (car aliases)))))) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
298 (princ "\n") |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
299 (if (and doc-string |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
300 (setq doc-string (coding-system-doc-string coding-system))) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
301 (princ (format " %s\n" doc-string))))) |
17052 | 302 |
303 ;;;###autoload | |
304 (defun describe-current-coding-system () | |
22306 | 305 "Display coding systems currently used, in detail." |
17052 | 306 (interactive) |
307 (with-output-to-temp-buffer "*Help*" | |
308 (let* ((proc (get-buffer-process (current-buffer))) | |
309 (process-coding-systems (if proc (process-coding-system proc)))) | |
19081
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
310 (princ "Coding system for saving this buffer:\n ") |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
311 (if (local-variable-p 'buffer-file-coding-system) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
312 (print-coding-system-briefly buffer-file-coding-system) |
19081
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
313 (princ "Not set locally, use the default.\n")) |
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
314 (princ "Default coding system (for new files):\n ") |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
315 (print-coding-system-briefly default-buffer-file-coding-system) |
19081
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
316 (princ "Coding system for keyboard input:\n ") |
17052 | 317 (print-coding-system-briefly (keyboard-coding-system)) |
19081
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
318 (princ "Coding system for terminal output:\n ") |
17052 | 319 (print-coding-system-briefly (terminal-coding-system)) |
19081
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
320 (when (get-buffer-process (current-buffer)) |
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
321 (princ "Coding systems for process I/O:\n") |
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
322 (princ " encoding input to the process: ") |
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
323 (print-coding-system-briefly (cdr process-coding-systems)) |
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
324 (princ " decoding output from the process: ") |
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
325 (print-coding-system-briefly (car process-coding-systems))) |
19657
940d50684d68
(describe-current-coding-system): Add missing newline in output.
Richard M. Stallman <rms@gnu.org>
parents:
19557
diff
changeset
|
326 (princ "Defaults for subprocess I/O:\n") |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
327 (princ " decoding: ") |
17052 | 328 (print-coding-system-briefly (car default-process-coding-system)) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
329 (princ " encoding: ") |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
330 (print-coding-system-briefly (cdr default-process-coding-system))) |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
331 |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
332 (save-excursion |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
333 (set-buffer standard-output) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
334 |
19081
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
335 (princ "\nPriority order for recognizing coding systems when reading files:\n") |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
336 (let ((l coding-category-list) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
337 (i 1) |
19265
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
338 (coding-list nil) |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
339 coding aliases) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
340 (while l |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
341 (setq coding (symbol-value (car l))) |
20114
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
342 ;; Do not list up the same coding system twice. |
22885
5effd15f2a18
(describe-current-coding-system):
Kenichi Handa <handa@m17n.org>
parents:
22339
diff
changeset
|
343 (when (and coding (not (memq coding coding-list))) |
19265
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
344 (setq coding-list (cons coding coding-list)) |
20114
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
345 (princ (format " %d. %s " i coding)) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
346 (setq aliases (coding-system-get coding 'alias-coding-systems)) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
347 (if (eq coding (car aliases)) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
348 (if (cdr aliases) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
349 (princ (cons 'alias: (cdr aliases)))) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
350 (if (memq coding aliases) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
351 (princ (list 'alias 'of (car aliases))))) |
19265
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
352 (terpri) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
353 (setq i (1+ i))) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
354 (setq l (cdr l)))) |
20114
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
355 |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
356 (princ "\n Other coding systems cannot be distinguished automatically |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
357 from these, and therefore cannot be recognized automatically |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
358 with the present coding system priorities.\n\n") |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
359 |
18799
6c0d648d2cf8
(describe-current-coding-system): Use coding-category-iso-7-else
Kenichi Handa <handa@m17n.org>
parents:
18696
diff
changeset
|
360 (let ((categories '(coding-category-iso-7 coding-category-iso-7-else)) |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
361 coding-system codings) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
362 (while categories |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
363 (setq coding-system (symbol-value (car categories))) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
364 (mapcar |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
365 (function |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
366 (lambda (x) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
367 (if (and (not (eq x coding-system)) |
20114
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
368 (coding-system-get x 'no-initial-designation) |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
369 (let ((flags (coding-system-flags x))) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
370 (not (or (aref flags 10) (aref flags 11))))) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
371 (setq codings (cons x codings))))) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
372 (get (car categories) 'coding-systems)) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
373 (if codings |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
374 (let ((max-col (frame-width)) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
375 pos) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
376 (princ (format " The followings are decoded correctly but recognized as %s:\n " coding-system)) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
377 (while codings |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
378 (setq pos (point)) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
379 (insert (format " %s" (car codings))) |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
380 (when (> (current-column) max-col) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
381 (goto-char pos) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
382 (insert "\n ") |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
383 (goto-char (point-max))) |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
384 (setq codings (cdr codings))) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
385 (insert "\n\n"))) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
386 (setq categories (cdr categories)))) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
387 |
19081
f33df9d64fe8
(describe-current-coding-system): Clean up output format.
Richard M. Stallman <rms@gnu.org>
parents:
18799
diff
changeset
|
388 (princ "Particular coding systems specified for certain file names:\n") |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
389 (terpri) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
390 (princ " OPERATION\tTARGET PATTERN\t\tCODING SYSTEM(s)\n") |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
391 (princ " ---------\t--------------\t\t----------------\n") |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
392 (let ((func (lambda (operation alist) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
393 (princ " ") |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
394 (princ operation) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
395 (if (not alist) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
396 (princ "\tnothing specified\n") |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
397 (while alist |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
398 (indent-to 16) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
399 (prin1 (car (car alist))) |
20114
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
400 (if (>= (current-column) 40) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
401 (newline)) |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
402 (indent-to 40) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
403 (princ (cdr (car alist))) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
404 (princ "\n") |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
405 (setq alist (cdr alist))))))) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
406 (funcall func "File I/O" file-coding-system-alist) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
407 (funcall func "Process I/O" process-coding-system-alist) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
408 (funcall func "Network I/O" network-coding-system-alist)) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
409 (help-mode)))) |
17052 | 410 |
411 ;; Print detailed information on CODING-SYSTEM. | |
20114
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
412 (defun print-coding-system (coding-system) |
17052 | 413 (let ((type (coding-system-type coding-system)) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
414 (eol-type (coding-system-eol-type coding-system)) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
415 (flags (coding-system-flags coding-system)) |
20114
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
416 (aliases (coding-system-get coding-system 'alias-coding-systems))) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
417 (if (not (eq (car aliases) coding-system)) |
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
418 (princ (format "%s (alias of %s)\n" coding-system (car aliases))) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
419 (princ coding-system) |
20114
cbf191888430
(describe-coding-system): Print
Kenichi Handa <handa@m17n.org>
parents:
20092
diff
changeset
|
420 (setq aliases (cdr aliases)) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
421 (while aliases |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
422 (princ ",") |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
423 (princ (car aliases)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
424 (setq aliases (cdr aliases))) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
425 (princ (format ":%s:%c:%d:" |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
426 type |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
427 (coding-system-mnemonic coding-system) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
428 (if (integerp eol-type) eol-type 3))) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
429 (cond ((eq type 2) ; ISO-2022 |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
430 (let ((idx 0) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
431 charset) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
432 (while (< idx 4) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
433 (setq charset (aref flags idx)) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
434 (cond ((null charset) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
435 (princ -1)) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
436 ((eq charset t) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
437 (princ -2)) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
438 ((charsetp charset) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
439 (princ charset)) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
440 ((listp charset) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
441 (princ "(") |
17052 | 442 (princ (car charset)) |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
443 (setq charset (cdr charset)) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
444 (while charset |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
445 (princ ",") |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
446 (princ (car charset)) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
447 (setq charset (cdr charset))) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
448 (princ ")"))) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
449 (princ ",") |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
450 (setq idx (1+ idx))) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
451 (while (< idx 12) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
452 (princ (if (aref flags idx) 1 0)) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
453 (princ ",") |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
454 (setq idx (1+ idx))) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
455 (princ (if (aref flags idx) 1 0)))) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
456 ((eq type 4) ; CCL |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
457 (let (i len) |
21967 | 458 (if (symbolp (car flags)) |
459 (princ (format " %s" (car flags))) | |
460 (setq i 0 len (length (car flags))) | |
461 (while (< i len) | |
462 (princ (format " %x" (aref (car flags) i))) | |
463 (setq i (1+ i)))) | |
17052 | 464 (princ ",") |
21967 | 465 (if (symbolp (cdr flags)) |
466 (princ (format "%s" (cdr flags))) | |
467 (setq i 0 len (length (cdr flags))) | |
468 (while (< i len) | |
469 (princ (format " %x" (aref (cdr flags) i))) | |
470 (setq i (1+ i)))))) | |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
471 (t (princ 0))) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
472 (princ ":") |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
473 (princ (coding-system-doc-string coding-system)) |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
474 (princ "\n")))) |
17052 | 475 |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
476 ;;;###autoload |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
477 (defun list-coding-systems (&optional arg) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
478 "Display a list of all coding systems. |
22306 | 479 This shows the mnemonic letter, name, and description of each coding system. |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
480 |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
481 With prefix arg, the output format gets more cryptic, |
22306 | 482 but still contains full information about each coding system." |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
483 (interactive "P") |
17052 | 484 (with-output-to-temp-buffer "*Help*" |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
485 (list-coding-systems-1 arg))) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
486 |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
487 (defun list-coding-systems-1 (arg) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
488 (if (null arg) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
489 (princ "\ |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
490 ############################################### |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
491 # List of coding systems in the following format: |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
492 # MNEMONIC-LETTER -- CODING-SYSTEM-NAME |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
493 # DOC-STRING |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
494 ") |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
495 (princ "\ |
17052 | 496 ######################### |
497 ## LIST OF CODING SYSTEMS | |
498 ## Each line corresponds to one coding system | |
499 ## Format of a line is: | |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
500 ## NAME[,ALIAS...]:TYPE:MNEMONIC:EOL:FLAGS:POST-READ-CONVERSION |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
501 ## :PRE-WRITE-CONVERSION:DOC-STRING, |
17052 | 502 ## where |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
503 ## NAME = coding system name |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
504 ## ALIAS = alias of the coding system |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
505 ## TYPE = nil (no conversion), t (undecided or automatic detection), |
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
506 ## 0 (EMACS-MULE), 1 (SJIS), 2 (ISO2022), 3 (BIG5), or 4 (CCL) |
17052 | 507 ## EOL = 0 (LF), 1 (CRLF), 2 (CR), or 3 (Automatic detection) |
508 ## FLAGS = | |
509 ## if TYPE = 2 then | |
510 ## comma (`,') separated data of the followings: | |
511 ## G0, G1, G2, G3, SHORT-FORM, ASCII-EOL, ASCII-CNTL, SEVEN, | |
512 ## LOCKING-SHIFT, SINGLE-SHIFT, USE-ROMAN, USE-OLDJIS, NO-ISO6429 | |
513 ## else if TYPE = 4 then | |
514 ## comma (`,') separated CCL programs for read and write | |
515 ## else | |
516 ## 0 | |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
517 ## POST-READ-CONVERSION, PRE-WRITE-CONVERSION = function name to be called |
17052 | 518 ## |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
519 ")) |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
520 (let ((bases (coding-system-list 'base-only)) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
521 coding-system) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
522 (while bases |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
523 (setq coding-system (car bases)) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
524 (if (null arg) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
525 (print-coding-system-briefly coding-system 'doc-string) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
526 (print-coding-system coding-system)) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
527 (setq bases (cdr bases))))) |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
528 |
26688
1830bc1903fb
(list-coding-categories): Fix typo;
Gerd Moellmann <gerd@gnu.org>
parents:
26189
diff
changeset
|
529 ;;;###autoload |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
530 (defun list-coding-categories () |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
531 "Display a list of all coding categories." |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
532 (with-output-to-temp-buffer "*Help*" |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
533 (princ "\ |
17052 | 534 ############################ |
535 ## LIST OF CODING CATEGORIES (ordered by priority) | |
536 ## CATEGORY:CODING-SYSTEM | |
537 ## | |
538 ") | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
539 (let ((l coding-category-list)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
540 (while l |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
541 (princ (format "%s:%s\n" (car l) (symbol-value (car l)))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
542 (setq l (cdr l)))))) |
17052 | 543 |
544 ;;; FONT | |
545 | |
546 ;; Print information of a font in FONTINFO. | |
547 (defun describe-font-internal (font-info &optional verbose) | |
548 (print-list "name (opened by):" (aref font-info 0)) | |
549 (print-list " full name:" (aref font-info 1)) | |
550 (let ((charset (aref font-info 2))) | |
551 (print-list " charset:" | |
552 (format "%s (%s)" charset (charset-description charset)))) | |
553 (print-list " size:" (format "%d" (aref font-info 3))) | |
554 (print-list " height:" (format "%d" (aref font-info 4))) | |
555 (print-list " baseline-offset:" (format "%d" (aref font-info 5))) | |
556 (print-list "relative-compose:" (format "%d" (aref font-info 6)))) | |
557 | |
558 ;;;###autoload | |
559 (defun describe-font (fontname) | |
560 "Display information about fonts which partially match FONTNAME." | |
20092 | 561 (interactive "sFontname (default, current choice for ASCII chars): ") |
21469
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
562 (or (and window-system (boundp 'global-fontset-alist)) |
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
563 (error "No fontsets being used")) |
18696
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
564 (when (or (not fontname) (= (length fontname) 0)) |
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
565 (setq fontname (cdr (assq 'font (frame-parameters)))) |
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
566 (if (query-fontset fontname) |
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
567 (setq fontname |
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
568 (nth 2 (assq 'ascii (aref (fontset-info fontname) 2)))))) |
17052 | 569 (let ((font-info (font-info fontname))) |
570 (if (null font-info) | |
571 (message "No matching font") | |
572 (with-output-to-temp-buffer "*Help*" | |
573 (describe-font-internal font-info 'verbose))))) | |
574 | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
575 ;; Print information of FONTSET. If optional arg PRINT-FONTS is |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
576 ;; non-nil, print also names of all fonts in FONTSET. This function |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
577 ;; actually INSERT such information in the current buffer. |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
578 (defun print-fontset (fontset &optional print-fonts) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
579 (let* ((fontset-info (fontset-info fontset)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
580 (size (aref fontset-info 0)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
581 (height (aref fontset-info 1)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
582 (fonts (and print-fonts (aref fontset-info 2))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
583 (xlfd-fields (x-decompose-font-name fontset)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
584 style) |
19265
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
585 (if xlfd-fields |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
586 (let ((weight (aref xlfd-fields xlfd-regexp-weight-subnum)) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
587 (slant (aref xlfd-fields xlfd-regexp-slant-subnum))) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
588 (if (string-match "^bold$\\|^demibold$" weight) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
589 (setq style (concat weight " ")) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
590 (setq style "medium ")) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
591 (cond ((string-match "^i$" slant) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
592 (setq style (concat style "italic"))) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
593 ((string-match "^o$" slant) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
594 (setq style (concat style "slant"))) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
595 ((string-match "^ri$" slant) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
596 (setq style (concat style "reverse italic"))) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
597 ((string-match "^ro$" slant) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
598 (setq style (concat style "reverse slant"))))) |
6b31dac7f72b
(print-fontset): Don't hang even if a
Kenichi Handa <handa@m17n.org>
parents:
19081
diff
changeset
|
599 (setq style " ? ")) |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
600 (beginning-of-line) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
601 (insert fontset) |
18643
c9b94c6ab8f1
(print-fontset): Output format tuned.
Kenichi Handa <handa@m17n.org>
parents:
18559
diff
changeset
|
602 (indent-to 58) |
18696
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
603 (insert (if (> size 0) (format "%2dx%d" size height) " -")) |
18643
c9b94c6ab8f1
(print-fontset): Output format tuned.
Kenichi Handa <handa@m17n.org>
parents:
18559
diff
changeset
|
604 (indent-to 64) |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
605 (insert style "\n") |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
606 (when print-fonts |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
607 (insert " O Charset / Fontname\n" |
18696
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
608 " - ------------------\n") |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
609 (sort-charset-list) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
610 (let ((l charset-list) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
611 charset font-info opened fontname) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
612 (while l |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
613 (setq charset (car l) l (cdr l)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
614 (setq font-info (assq charset fonts)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
615 (if (null font-info) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
616 (setq opened ?? fontname "not specified") |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
617 (if (nth 2 font-info) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
618 (if (stringp (nth 2 font-info)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
619 (setq opened ?o fontname (nth 2 font-info)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
620 (setq opened ?- fontname (nth 1 font-info))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
621 (setq opened ?x fontname (nth 1 font-info)))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
622 (insert (format " %c %s\n %s\n" |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
623 opened charset fontname))))))) |
17052 | 624 |
625 ;;;###autoload | |
626 (defun describe-fontset (fontset) | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
627 "Display information of FONTSET. |
22306 | 628 This shows the name, size, and style of FONTSET, and the list of fonts |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
629 contained in FONTSET. |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
630 |
18696
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
631 The column WDxHT contains width and height (pixels) of each fontset |
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
632 \(i.e. those of ASCII font in the fontset). The letter `-' in this |
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
633 column means that the corresponding fontset is not yet used in any |
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
634 frame. |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
635 |
22306 | 636 The O column for each font contains one of the following letters: |
18643
c9b94c6ab8f1
(print-fontset): Output format tuned.
Kenichi Handa <handa@m17n.org>
parents:
18559
diff
changeset
|
637 o -- font already opened |
c9b94c6ab8f1
(print-fontset): Output format tuned.
Kenichi Handa <handa@m17n.org>
parents:
18559
diff
changeset
|
638 - -- font not yet opened |
c9b94c6ab8f1
(print-fontset): Output format tuned.
Kenichi Handa <handa@m17n.org>
parents:
18559
diff
changeset
|
639 x -- font can't be opened |
c9b94c6ab8f1
(print-fontset): Output format tuned.
Kenichi Handa <handa@m17n.org>
parents:
18559
diff
changeset
|
640 ? -- no font specified |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
641 |
22306 | 642 The Charset column for each font contains a name of character set |
643 displayed (for this fontset) using that font." | |
17052 | 644 (interactive |
21469
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
645 (if (not (and window-system (boundp 'global-fontset-alist))) |
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
646 (error "No fontsets being used") |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
647 (let ((fontset-list (mapcar '(lambda (x) (list x)) (fontset-list))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
648 (completion-ignore-case t)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
649 (list (completing-read |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
650 "Fontset (default, used by the current frame): " |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
651 fontset-list nil t))))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
652 (if (= (length fontset) 0) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
653 (setq fontset (cdr (assq 'font (frame-parameters))))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
654 (if (not (query-fontset fontset)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
655 (error "Current frame is using font, not fontset")) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
656 (let ((fontset-info (fontset-info fontset))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
657 (with-output-to-temp-buffer "*Help*" |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
658 (save-excursion |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
659 (set-buffer standard-output) |
18696
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
660 (insert "Fontset-Name\t\t\t\t\t\t WDxHT Style\n") |
1caf720e4f55
(print-fontset): Output format improved.
Kenichi Handa <handa@m17n.org>
parents:
18643
diff
changeset
|
661 (insert "------------\t\t\t\t\t\t ----- -----\n") |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
662 (print-fontset fontset t))))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
663 |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
664 ;;;###autoload |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
665 (defun list-fontsets (arg) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
666 "Display a list of all fontsets. |
22306 | 667 This shows the name, size, and style of each fontset. |
668 With prefix arg, it also list the fonts contained in each fontset; | |
669 see the function `describe-fontset' for the format of the list." | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
670 (interactive "P") |
21469
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
671 (if (not (and window-system (boundp 'global-fontset-alist))) |
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
672 (error "No fontsets being used") |
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
673 (with-output-to-temp-buffer "*Help*" |
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
674 (save-excursion |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
675 ;; This code is duplicated near the end of mule-diag. |
21469
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
676 (set-buffer standard-output) |
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
677 (insert "Fontset-Name\t\t\t\t\t\t WDxHT Style\n") |
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
678 (insert "------------\t\t\t\t\t\t ----- -----\n") |
24161
782215de9b98
(list-fontsets): Sort fontsets by plain names.
Kenichi Handa <handa@m17n.org>
parents:
23582
diff
changeset
|
679 (let ((fontsets |
782215de9b98
(list-fontsets): Sort fontsets by plain names.
Kenichi Handa <handa@m17n.org>
parents:
23582
diff
changeset
|
680 (sort (fontset-list) |
782215de9b98
(list-fontsets): Sort fontsets by plain names.
Kenichi Handa <handa@m17n.org>
parents:
23582
diff
changeset
|
681 (function (lambda (x y) |
782215de9b98
(list-fontsets): Sort fontsets by plain names.
Kenichi Handa <handa@m17n.org>
parents:
23582
diff
changeset
|
682 (string< (fontset-plain-name x) |
782215de9b98
(list-fontsets): Sort fontsets by plain names.
Kenichi Handa <handa@m17n.org>
parents:
23582
diff
changeset
|
683 (fontset-plain-name y))))))) |
21469
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
684 (while fontsets |
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
685 (print-fontset (car fontsets) arg) |
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
686 (setq fontsets (cdr fontsets)))))))) |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
687 |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
688 ;;;###autoload |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
689 (defun list-input-methods () |
22306 | 690 "Display information about all input methods." |
18300
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
691 (interactive) |
0436624abece
(list-character-sets): Set major mode of *Help*
Kenichi Handa <handa@m17n.org>
parents:
18199
diff
changeset
|
692 (with-output-to-temp-buffer "*Help*" |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
693 (list-input-methods-1))) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
694 |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
695 (defun list-input-methods-1 () |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
696 (if (not input-method-alist) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
697 (progn |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
698 (princ " |
21469
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
699 No input method is available, perhaps because you have not yet |
20163
5ff1329561b4
(list-input-methods): Handle the case
Kenichi Handa <handa@m17n.org>
parents:
20114
diff
changeset
|
700 installed LEIM (Libraries of Emacs Input Method). |
5ff1329561b4
(list-input-methods): Handle the case
Kenichi Handa <handa@m17n.org>
parents:
20114
diff
changeset
|
701 |
21469
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
702 LEIM is available from the same ftp directory as Emacs. For instance, |
21979
ce6e1fa2fefc
(list-input-methods): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
21967
diff
changeset
|
703 if there exists an archive file `emacs-20.N.tar.gz', there should also |
ce6e1fa2fefc
(list-input-methods): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
21967
diff
changeset
|
704 be a file `leim-20.N.tar.gz'. When you extract this file, LEIM files |
ce6e1fa2fefc
(list-input-methods): Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
21967
diff
changeset
|
705 are put under the subdirectory `emacs-20.N/leim'. When you install |
20163
5ff1329561b4
(list-input-methods): Handle the case
Kenichi Handa <handa@m17n.org>
parents:
20114
diff
changeset
|
706 Emacs again, you should be able to use various input methods.")) |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
707 (princ "LANGUAGE\n NAME (`TITLE' in mode line)\n") |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
708 (princ " SHORT-DESCRIPTION\n------------------------------\n") |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
709 (setq input-method-alist |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
710 (sort input-method-alist |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
711 (function (lambda (x y) (string< (nth 1 x) (nth 1 y)))))) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
712 (let ((l input-method-alist) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
713 language elt) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
714 (while l |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
715 (setq elt (car l) l (cdr l)) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
716 (when (not (equal language (nth 1 elt))) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
717 (setq language (nth 1 elt)) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
718 (princ language) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
719 (terpri)) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
720 (princ (format " %s (`%s' in mode line)\n %s\n" |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
721 (car elt) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
722 (let ((title (nth 3 elt))) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
723 (if (and (consp title) (stringp (car title))) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
724 (car title) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
725 title)) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
726 (let ((description (nth 4 elt))) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
727 (string-match ".*" description) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
728 (match-string 0 description)))))))) |
17052 | 729 |
730 ;;; DIAGNOSIS | |
731 | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
732 ;; Insert a header of a section with SECTION-NUMBER and TITLE. |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
733 (defun insert-section (section-number title) |
17052 | 734 (insert "########################################\n" |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
735 "# Section " (format "%d" section-number) ". " title "\n" |
17052 | 736 "########################################\n\n")) |
737 | |
738 ;;;###autoload | |
739 (defun mule-diag () | |
24724
df2a95fa1429
(mule-diag): Change MULE to Mule in docstring.
Kenichi Handa <handa@m17n.org>
parents:
24691
diff
changeset
|
740 "Display diagnosis of the multilingual environment (Mule). |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
741 |
22306 | 742 This shows various information related to the current multilingual |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
743 environment, including lists of input methods, coding systems, |
22306 | 744 character sets, and fontsets (if Emacs is running under a window |
21469
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
745 system which uses fontsets)." |
17052 | 746 (interactive) |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
747 (with-output-to-temp-buffer "*Mule-Diagnosis*" |
17052 | 748 (save-excursion |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
749 (set-buffer standard-output) |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
750 (insert "###############################################\n" |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
751 "### Current Status of Multilingual Features ###\n" |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
752 "###############################################\n\n" |
17052 | 753 "CONTENTS: Section 1. General Information\n" |
754 " Section 2. Display\n" | |
755 " Section 3. Input methods\n" | |
756 " Section 4. Coding systems\n" | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
757 " Section 5. Character sets\n") |
21469
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
758 (if (and window-system (boundp 'global-fontset-alist)) |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
759 (insert " Section 6. Fontsets\n")) |
17052 | 760 (insert "\n") |
761 | |
762 (insert-section 1 "General Information") | |
19425
572165bfff3e
(mule-diag): Don't print primary-language.
Richard M. Stallman <rms@gnu.org>
parents:
19265
diff
changeset
|
763 (insert "Version of this emacs:\n " (emacs-version) "\n\n") |
17052 | 764 |
765 (insert-section 2 "Display") | |
766 (if window-system | |
767 (insert "Window-system: " | |
768 (symbol-name window-system) | |
769 (format "%s" window-system-version)) | |
770 (insert "Terminal: " (getenv "TERM"))) | |
771 (insert "\n\n") | |
772 | |
773 (if (eq window-system 'x) | |
774 (let ((font (cdr (assq 'font (frame-parameters))))) | |
775 (insert "The selected frame is using the " | |
776 (if (query-fontset font) "fontset" "font") | |
777 ":\n\t" font)) | |
778 (insert "Coding system of the terminal: " | |
779 (symbol-name (terminal-coding-system)))) | |
780 (insert "\n\n") | |
781 | |
782 (insert-section 3 "Input methods") | |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
783 (list-input-methods-1) |
17052 | 784 (insert "\n") |
785 (if default-input-method | |
26189
88faf40281cd
(mule-diag): Handle the case that
Kenichi Handa <handa@m17n.org>
parents:
24865
diff
changeset
|
786 (insert (format "Default input method: %s\n" default-input-method)) |
19657
940d50684d68
(describe-current-coding-system): Add missing newline in output.
Richard M. Stallman <rms@gnu.org>
parents:
19557
diff
changeset
|
787 (insert "No default input method is specified\n")) |
17052 | 788 |
789 (insert-section 4 "Coding systems") | |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
790 (list-coding-systems-1 t) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
791 (princ "\ |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
792 ############################ |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
793 ## LIST OF CODING CATEGORIES (ordered by priority) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
794 ## CATEGORY:CODING-SYSTEM |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
795 ## |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
796 ") |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
797 (let ((l coding-category-list)) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
798 (while l |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
799 (princ (format "%s:%s\n" (car l) (symbol-value (car l)))) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
800 (setq l (cdr l)))) |
17052 | 801 (insert "\n") |
802 | |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
803 (insert-section 5 "Character sets") |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
804 (list-character-sets-1 t) |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
805 (insert "\n") |
17052 | 806 |
21469
ea652c41eec6
(list-input-methods): Fix doc string.
Karl Heuer <kwzh@gnu.org>
parents:
20731
diff
changeset
|
807 (when (and window-system (boundp 'global-fontset-alist)) |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
808 ;; This code duplicates most of list-fontsets. |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
809 (insert-section 6 "Fontsets") |
22339
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
810 (insert "Fontset-Name\t\t\t\t\t\t WDxHT Style\n") |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
811 (insert "------------\t\t\t\t\t\t ----- -----\n") |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
812 (let ((fontsets (fontset-list))) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
813 (while fontsets |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
814 (print-fontset (car fontsets) t) |
69de59462e22
(list-character-sets-1): New subroutine.
Karl Heuer <kwzh@gnu.org>
parents:
22306
diff
changeset
|
815 (setq fontsets (cdr fontsets))))) |
22290
31291d62195e
(mule-diag): Don't call help-mode.
Karl Heuer <kwzh@gnu.org>
parents:
21979
diff
changeset
|
816 (print-help-return-message)))) |
17052 | 817 |
818 | |
819 ;;; DUMP DATA FILE | |
820 | |
821 ;;;###autoload | |
822 (defun dump-charsets () | |
22306 | 823 "Dump information about all charsets into the file `CHARSETS'. |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
824 The file is saved in the directory `data-directory'." |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
825 (let ((file (expand-file-name "CHARSETS" data-directory)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
826 buf) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
827 (or (file-writable-p file) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
828 (error "Can't write to file %s" file)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
829 (setq buf (find-file-noselect file)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
830 (save-window-excursion |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
831 (save-excursion |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
832 (set-buffer buf) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
833 (setq buffer-read-only nil) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
834 (erase-buffer) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
835 (list-character-sets t) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
836 (insert-buffer-substring "*Help*") |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
837 (let (make-backup-files |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
838 coding-system-for-write) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
839 (save-buffer)))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
840 (kill-buffer buf)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
841 (if noninteractive |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
842 (kill-emacs))) |
17052 | 843 |
844 ;;;###autoload | |
845 (defun dump-codings () | |
22306 | 846 "Dump information about all coding systems into the file `CODINGS'. |
18559
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
847 The file is saved in the directory `data-directory'." |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
848 (let ((file (expand-file-name "CODINGS" data-directory)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
849 buf) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
850 (or (file-writable-p file) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
851 (error "Can't write to file %s" file)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
852 (setq buf (find-file-noselect file)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
853 (save-window-excursion |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
854 (save-excursion |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
855 (set-buffer buf) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
856 (setq buffer-read-only nil) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
857 (erase-buffer) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
858 (list-coding-systems t) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
859 (insert-buffer-substring "*Help*") |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
860 (list-coding-categories) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
861 (insert-buffer-substring "*Help*") |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
862 (let (make-backup-files |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
863 coding-system-for-write) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
864 (save-buffer)))) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
865 (kill-buffer buf)) |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
866 (if noninteractive |
20369fbd0f91
(print-list): Use macro when.
Kenichi Handa <handa@m17n.org>
parents:
18377
diff
changeset
|
867 (kill-emacs))) |
17052 | 868 |
18199
15177bdb2fcf
(describe-coding-system): Change format of output.
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
869 ;;; mule-diag.el ends here |