35 |
|
|
36 |
;;; General utility function |
;;; General utility function |
37 |
|
|
|
;; Print all arguments with single space separator in one line. |
|
38 |
(defun print-list (&rest args) |
(defun print-list (&rest args) |
39 |
|
"Print all arguments with single space separator in one line." |
40 |
(while (cdr args) |
(while (cdr args) |
41 |
(when (car args) |
(when (car args) |
42 |
(princ (car args)) |
(princ (car args)) |
45 |
(princ (car args)) |
(princ (car args)) |
46 |
(princ "\n")) |
(princ "\n")) |
47 |
|
|
|
;; Re-order the elements of charset-list. |
|
|
(defun sort-charset-list () |
|
|
(setq charset-list |
|
|
(sort charset-list |
|
|
(function (lambda (x y) (< (charset-id x) (charset-id y))))))) |
|
|
|
|
48 |
;;; CHARSET |
;;; CHARSET |
49 |
|
|
50 |
(define-button-type 'sort-listed-character-sets |
(define-button-type 'sort-listed-character-sets |
92 |
(if (display-mouse-p) "\\[help-follow-mouse] or ") |
(if (display-mouse-p) "\\[help-follow-mouse] or ") |
93 |
"\\[help-follow]:\n"))) |
"\\[help-follow]:\n"))) |
94 |
(insert " on a column title to sort by that title,") |
(insert " on a column title to sort by that title,") |
95 |
(indent-to 56) |
(indent-to 48) |
96 |
(insert "+----DIMENSION\n") |
(insert "+----DIMENSION\n") |
97 |
(insert " on a charset name to list characters.") |
(insert " on a charset name to list characters.") |
98 |
(indent-to 56) |
(indent-to 48) |
99 |
(insert "| +--CHARS\n") |
(insert "| +--CHARS\n") |
100 |
(let ((columns '(("ID-NUM" . id) "\t" |
(let ((columns '(("CHARSET-NAME" . name) "\t\t\t\t\t" |
101 |
("CHARSET-NAME" . name) "\t\t\t" |
("D CH FINAL-CHAR" . iso-spec))) |
|
("MULTIBYTE-FORM" . id) "\t" |
|
|
("D CH FINAL-CHAR" . iso-spec))) |
|
102 |
pos) |
pos) |
103 |
(while columns |
(while columns |
104 |
(if (stringp (car columns)) |
(if (stringp (car columns)) |
109 |
(goto-char (point-max))) |
(goto-char (point-max))) |
110 |
(setq columns (cdr columns))) |
(setq columns (cdr columns))) |
111 |
(insert "\n")) |
(insert "\n")) |
112 |
(insert "------\t------------\t\t\t--------------\t- -- ----------\n") |
(insert "------------\t\t\t\t\t- --- ----------\n") |
113 |
|
|
114 |
;; Insert body sorted by charset IDs. |
;; Insert body sorted by charset IDs. |
115 |
(list-character-sets-1 'id))))) |
(list-character-sets-1 'name))))) |
116 |
|
|
117 |
(defun sort-listed-character-sets (sort-key) |
(defun sort-listed-character-sets (sort-key) |
118 |
(if sort-key |
(if sort-key |
125 |
(delete-region (point) (point-max)) |
(delete-region (point) (point-max)) |
126 |
(list-character-sets-1 sort-key))))) |
(list-character-sets-1 sort-key))))) |
127 |
|
|
|
(defun charset-multibyte-form-string (charset) |
|
|
(let ((info (charset-info charset))) |
|
|
(cond ((eq charset 'ascii) |
|
|
"xx") |
|
|
((eq charset 'eight-bit-control) |
|
|
(format "%2X Xx" (aref info 6))) |
|
|
((eq charset 'eight-bit-graphic) |
|
|
"XX") |
|
|
(t |
|
|
(let ((str (format "%2X" (aref info 6)))) |
|
|
(if (> (aref info 7) 0) |
|
|
(setq str (format "%s %2X" |
|
|
str (aref info 7)))) |
|
|
(setq str (concat str " XX")) |
|
|
(if (> (aref info 2) 1) |
|
|
(setq str (concat str " XX"))) |
|
|
str))))) |
|
|
|
|
|
;; Insert a list of character sets sorted by SORT-KEY. SORT-KEY |
|
|
;; should be one of `id', `name', and `iso-spec'. If SORT-KEY is nil, |
|
|
;; it defaults to `id'. |
|
|
|
|
128 |
(defun list-character-sets-1 (sort-key) |
(defun list-character-sets-1 (sort-key) |
129 |
|
"Insert a list of character sets sorted by SORT-KEY. |
130 |
|
SORT-KEY should be `name' or `iso-spec' (default `name')." |
131 |
(or sort-key |
(or sort-key |
132 |
(setq sort-key 'id)) |
(setq sort-key 'name)) |
133 |
(let ((tail (charset-list)) |
(let ((tail charset-list) |
134 |
charset-info-list elt charset info sort-func) |
charset-info-list charset sort-func) |
135 |
(while tail |
(dolist (charset charset-list) |
|
(setq charset (car tail) tail (cdr tail) |
|
|
info (charset-info charset)) |
|
|
|
|
136 |
;; Generate a list that contains all information to display. |
;; Generate a list that contains all information to display. |
137 |
(setq charset-info-list |
(push (list charset |
138 |
(cons (list (charset-id charset) ; ID-NUM |
(charset-dimension charset) |
139 |
charset ; CHARSET-NAME |
(charset-chars charset) |
140 |
(charset-multibyte-form-string charset); MULTIBYTE-FORM |
(charset-iso-final-char charset)) |
141 |
(aref info 2) ; DIMENSION |
charset-info-list)) |
|
(aref info 3) ; CHARS |
|
|
(aref info 8) ; FINAL-CHAR |
|
|
) |
|
|
charset-info-list))) |
|
142 |
|
|
143 |
;; Determine a predicate for `sort' by SORT-KEY. |
;; Determine a predicate for `sort' by SORT-KEY. |
144 |
(setq sort-func |
(setq sort-func |
145 |
(cond ((eq sort-key 'id) |
(cond ((eq sort-key 'name) |
146 |
(function (lambda (x y) (< (car x) (car y))))) |
(lambda (x y) (string< (car x) (car y)))) |
|
|
|
|
((eq sort-key 'name) |
|
|
(function (lambda (x y) (string< (nth 1 x) (nth 1 y))))) |
|
147 |
|
|
148 |
((eq sort-key 'iso-spec) |
((eq sort-key 'iso-spec) |
149 |
;; Sort by DIMENSION CHARS FINAL-CHAR |
;; Sort by DIMENSION CHARS FINAL-CHAR |
150 |
(function |
(function |
151 |
(lambda (x y) |
(lambda (x y) |
152 |
(or (< (nth 3 x) (nth 3 y)) |
(or (< (nth 1 x) (nth 1 y)) |
153 |
(and (= (nth 3 x) (nth 3 y)) |
(and (= (nth 1 x) (nth 1 y)) |
154 |
(or (< (nth 4 x) (nth 4 y)) |
(or (< (nth 2 x) (nth 2 y)) |
155 |
(and (= (nth 4 x) (nth 4 y)) |
(and (= (nth 2 x) (nth 2 y)) |
156 |
(< (nth 5 x) (nth 5 y))))))))) |
(< (nth 3 x) (nth 3 y))))))))) |
157 |
(t |
(t |
158 |
(error "Invalid charset sort key: %s" sort-key)))) |
(error "Invalid charset sort key: %s" sort-key)))) |
159 |
|
|
163 |
(while charset-info-list |
(while charset-info-list |
164 |
(setq elt (car charset-info-list) |
(setq elt (car charset-info-list) |
165 |
charset-info-list (cdr charset-info-list)) |
charset-info-list (cdr charset-info-list)) |
166 |
(insert (format "%03d(%02X)" (car elt) (car elt))) ; ID-NUM |
(insert-text-button (symbol-name (car elt)) |
|
(indent-to 8) |
|
|
(insert-text-button (symbol-name (nth 1 elt)) |
|
167 |
:type 'list-charset-chars |
:type 'list-charset-chars |
168 |
'help-args (list (nth 1 elt))) |
'help-args (list (car elt))) |
169 |
(goto-char (point-max)) |
(goto-char (point-max)) |
170 |
(insert "\t") |
(insert "\t") |
171 |
(indent-to 40) |
;; (indent-to 40) |
172 |
(insert (nth 2 elt)) ; MULTIBYTE-FORM |
;; (insert (nth 2 elt)) ; MULTIBYTE-FORM |
173 |
(indent-to 56) |
(indent-to 48) |
174 |
(insert (format "%d %2d " (nth 3 elt) (nth 4 elt)) ; DIMENSION and CHARS |
(insert (format "%d %3d " (nth 1 elt) (nth 2 elt)) ; DIMENSION and CHARS |
175 |
(if (< (nth 5 elt) 0) "none" (nth 5 elt))) ; FINAL-CHAR |
(if (< (nth 3 elt) 0) |
176 |
|
"none" |
177 |
|
(nth 3 elt))) ; FINAL-CHAR |
178 |
(insert "\n")))) |
(insert "\n")))) |
179 |
|
|
180 |
|
|
186 |
## Each line corresponds to one charset. |
## Each line corresponds to one charset. |
187 |
## The following attributes are listed in this order |
## The following attributes are listed in this order |
188 |
## separated by a colon `:' in one line. |
## separated by a colon `:' in one line. |
|
## CHARSET-ID, |
|
189 |
## CHARSET-SYMBOL-NAME, |
## CHARSET-SYMBOL-NAME, |
190 |
## DIMENSION (1 or 2) |
## DIMENSION (1 or 2) |
191 |
## CHARS (94 or 96) |
## CHARS (94 or 96) |
|
## BYTES (of multibyte form: 1, 2, 3, or 4), |
|
192 |
## WIDTH (occupied column numbers: 1 or 2), |
## WIDTH (occupied column numbers: 1 or 2), |
193 |
## DIRECTION (0:left-to-right, 1:right-to-left), |
## DIRECTION (0:left-to-right, 1:right-to-left), |
194 |
## ISO-FINAL-CHAR (character code of ISO-2022's final character) |
## ISO-FINAL-CHAR (character code of ISO-2022's final character) |
199 |
charset) |
charset) |
200 |
(while l |
(while l |
201 |
(setq charset (car l) l (cdr l)) |
(setq charset (car l) l (cdr l)) |
202 |
(princ (format "%03d:%s:%d:%d:%d:%d:%d:%d:%d:%s\n" |
(princ (format "%s:%d:%d:%d:%d:%s\n" |
|
(charset-id charset) |
|
203 |
charset |
charset |
204 |
(charset-dimension charset) |
(charset-dimension charset) |
205 |
(charset-chars charset) |
(charset-chars charset) |
206 |
(charset-bytes charset) |
(charset-bytes charset) |
207 |
(charset-width charset) |
(aref char-width-table (make-char charset)) |
208 |
(charset-direction charset) |
;;; (charset-direction charset) |
209 |
(charset-iso-final-char charset) |
(charset-iso-final-char charset) |
210 |
(charset-iso-graphic-plane charset) |
;;; (charset-iso-graphic-plane charset) |
211 |
(charset-description charset)))))) |
(charset-description charset)))))) |
212 |
|
|
213 |
(defvar non-iso-charset-alist |
(defvar non-iso-charset-alist nil |
214 |
`((mac-roman |
"Obsolete.") |
215 |
nil |
(make-obsolete-variable 'non-iso-charset-alist "no longer relevant" "22.1") |
|
mac-roman-decoder |
|
|
((0 255))) |
|
|
(viscii |
|
|
(ascii vietnamese-viscii-lower vietnamese-viscii-upper) |
|
|
viet-viscii-nonascii-translation-table |
|
|
((0 255))) |
|
|
(koi8-r |
|
|
(ascii cyrillic-iso8859-5) |
|
|
cyrillic-koi8-r-nonascii-translation-table |
|
|
((32 255))) |
|
|
(alternativnyj |
|
|
(ascii cyrillic-iso8859-5) |
|
|
cyrillic-alternativnyj-nonascii-translation-table |
|
|
((32 255))) |
|
|
(big5 |
|
|
(ascii chinese-big5-1 chinese-big5-2) |
|
|
decode-big5-char |
|
|
((32 127) |
|
|
((?\xA1 ?\xFE) . (?\x40 ?\x7E ?\xA1 ?\xFE)))) |
|
|
(sjis |
|
|
(ascii katakana-jisx0201 japanese-jisx0208) |
|
|
decode-sjis-char |
|
|
((32 127 ?\xA1 ?\xDF) |
|
|
((?\x81 ?\x9F ?\xE0 ?\xEF) . (?\x40 ?\x7E ?\x80 ?\xFC))))) |
|
|
"Alist of charset names vs the corresponding information. |
|
|
This is mis-named for historical reasons. The charsets are actually |
|
|
non-built-in ones. They correspond to Emacs coding systems, not Emacs |
|
|
charsets, i.e. what Emacs can read (or write) by mapping to (or |
|
|
from) Emacs internal charsets that typically correspond to a limited |
|
|
set of ISO charsets. |
|
|
|
|
|
Each element has the following format: |
|
|
(CHARSET CHARSET-LIST TRANSLATION-METHOD [ CODE-RANGE ]) |
|
|
|
|
|
CHARSET is the name (symbol) of the charset. |
|
|
|
|
|
CHARSET-LIST is a list of Emacs charsets into which characters of |
|
|
CHARSET are mapped. |
|
|
|
|
|
TRANSLATION-METHOD is a translation table (symbol) to translate a |
|
|
character code of CHARSET to the corresponding Emacs character |
|
|
code. It can also be a function to call with one argument, a |
|
|
character code in CHARSET. |
|
|
|
|
|
CODE-RANGE specifies the valid code ranges of CHARSET. |
|
|
It is a list of RANGEs, where each RANGE is of the form: |
|
|
(FROM1 TO1 FROM2 TO2 ...) |
|
|
or |
|
|
((FROM1-1 TO1-1 FROM1-2 TO1-2 ...) . (FROM2-1 TO2-1 FROM2-2 TO2-2 ...)) |
|
|
In the first form, valid codes are between FROM1 and TO1, or FROM2 and |
|
|
TO2, or... |
|
|
The second form is used for 2-byte codes. The car part is the ranges |
|
|
of the first byte, and the cdr part is the ranges of the second byte.") |
|
|
|
|
216 |
|
|
217 |
(defun decode-codepage-char (codepage code) |
(defun decode-codepage-char (codepage code) |
218 |
"Decode a character that has code CODE in CODEPAGE. |
"Decode a character that has code CODE in CODEPAGE. |
219 |
Return a decoded character string. Each CODEPAGE corresponds to a |
Return a decoded character string. Each CODEPAGE corresponds to a |
220 |
coding system cpCODEPAGE." |
coding system cpCODEPAGE. This function is obsolete." |
221 |
(let ((coding-system (intern (format "cp%d" codepage)))) |
(decode-char (intern (format "cp%d" codepage)) code)) |
222 |
(or (coding-system-p coding-system) |
(make-obsolete 'decode-codepage-char 'decode-char "22.1") |
|
(codepage-setup codepage)) |
|
|
(string-to-char |
|
|
(decode-coding-string (char-to-string code) coding-system)))) |
|
|
|
|
|
|
|
|
;; Add DOS codepages to `non-iso-charset-alist'. |
|
|
|
|
|
(let ((tail (cp-supported-codepages)) |
|
|
elt) |
|
|
(while tail |
|
|
(setq elt (car tail) tail (cdr tail)) |
|
|
;; Now ELT is (CODEPAGE . CHARSET), where CODEPAGE is a string |
|
|
;; (e.g. "850"), CHARSET is a charset that characters in CODEPAGE |
|
|
;; are mapped to. |
|
|
(unless (assq (intern (concat "cp" (car elt))) non-iso-charset-alist) |
|
|
(setq non-iso-charset-alist |
|
|
(cons (list (intern (concat "cp" (car elt))) |
|
|
(list 'ascii (cdr elt)) |
|
|
`(lambda (code) |
|
|
(decode-codepage-char ,(string-to-int (car elt)) |
|
|
code)) |
|
|
(list (list 0 255))) |
|
|
non-iso-charset-alist))))) |
|
|
|
|
223 |
|
|
224 |
;; A variable to hold charset input history. |
;; A variable to hold charset input history. |
225 |
(defvar charset-history nil) |
(defvar charset-history nil) |
228 |
;;;###autoload |
;;;###autoload |
229 |
(defun read-charset (prompt &optional default-value initial-input) |
(defun read-charset (prompt &optional default-value initial-input) |
230 |
"Read a character set from the minibuffer, prompting with string PROMPT. |
"Read a character set from the minibuffer, prompting with string PROMPT. |
231 |
It must be an Emacs character set listed in the variable `charset-list' |
It must be an Emacs character set listed in the variable `charset-list'. |
|
or a non-ISO character set listed in the variable |
|
|
`non-iso-charset-alist'. |
|
232 |
|
|
233 |
Optional arguments are DEFAULT-VALUE and INITIAL-INPUT. |
Optional arguments are DEFAULT-VALUE and INITIAL-INPUT. |
234 |
DEFAULT-VALUE, if non-nil, is the default value. |
DEFAULT-VALUE, if non-nil, is the default value. |
235 |
INITIAL-INPUT, if non-nil, is a string inserted in the minibuffer initially. |
INITIAL-INPUT, if non-nil, is a string inserted in the minibuffer initially. |
236 |
See the documentation of the function `completing-read' for the |
See the documentation of the function `completing-read' for the |
237 |
detailed meanings of these arguments." |
detailed meanings of these arguments." |
238 |
(let* ((table (append (mapcar (function (lambda (x) (list (symbol-name x)))) |
(let* ((table (mapcar (lambda (x) (list (symbol-name x))) charset-list)) |
|
charset-list) |
|
|
(mapcar (function (lambda (x) |
|
|
(list (symbol-name (car x))))) |
|
|
non-iso-charset-alist))) |
|
239 |
(charset (completing-read prompt table |
(charset (completing-read prompt table |
240 |
nil t initial-input 'charset-history |
nil t initial-input 'charset-history |
241 |
default-value))) |
default-value))) |
362 |
|
|
363 |
;;;###autoload |
;;;###autoload |
364 |
(defun list-charset-chars (charset) |
(defun list-charset-chars (charset) |
365 |
"Display a list of characters in the specified character set. |
"Display a list of characters in character set CHARSET. |
366 |
This can list both Emacs `official' (ISO standard) charsets and the |
This can list both Emacs `official' (ISO standard) charsets and the |
367 |
characters encoded by various Emacs coding systems which correspond to |
characters encoded by various Emacs coding systems which correspond to |
368 |
PC `codepages' and other coded character sets. See `non-iso-charset-alist'." |
PC `codepages' and other coded character sets." |
369 |
(interactive (list (read-charset "Character set: "))) |
(interactive (list (read-charset "Character set: "))) |
370 |
(with-output-to-temp-buffer "*Help*" |
(with-output-to-temp-buffer "*Help*" |
371 |
(with-current-buffer standard-output |
(with-current-buffer standard-output |
373 |
(set-buffer-multibyte t) |
(set-buffer-multibyte t) |
374 |
(cond ((charsetp charset) |
(cond ((charsetp charset) |
375 |
(list-iso-charset-chars charset)) |
(list-iso-charset-chars charset)) |
|
((assq charset non-iso-charset-alist) |
|
|
(list-non-iso-charset-chars charset)) |
|
376 |
(t |
(t |
377 |
(error "Invalid character set %s" charset)))))) |
(error "Invalid character set %s" charset)))))) |
378 |
|
|
380 |
;;;###autoload |
;;;###autoload |
381 |
(defun describe-character-set (charset) |
(defun describe-character-set (charset) |
382 |
"Display information about built-in character set CHARSET." |
"Display information about built-in character set CHARSET." |
383 |
(interactive (list (let ((non-iso-charset-alist nil)) |
(interactive (list (read-charset "Charset: "))) |
|
(read-charset "Charset: ")))) |
|
384 |
(or (charsetp charset) |
(or (charsetp charset) |
385 |
(error "Invalid charset: %S" charset)) |
(error "Invalid charset: %S" charset)) |
386 |
(let ((info (charset-info charset))) |
(let ((info (charset-info charset))) |
565 |
(let ((reg (cdr elt))) |
(let ((reg (cdr elt))) |
566 |
(nconc (aref gr reg) (list (car elt))))) |
(nconc (aref gr reg) (list (car elt))))) |
567 |
(dotimes (i 4) |
(dotimes (i 4) |
568 |
|
;; Fixme: |
569 |
(setq charset (aref flags graphic-register)) |
(setq charset (aref flags graphic-register)) |
570 |
(princ (format |
(princ (format |
571 |
" G%d -- %s\n" |
" G%d -- %s\n" |
620 |
(with-output-to-temp-buffer (help-buffer) |
(with-output-to-temp-buffer (help-buffer) |
621 |
(print-coding-system-briefly coding-system 'doc-string) |
(print-coding-system-briefly coding-system 'doc-string) |
622 |
(let* ((type (coding-system-type coding-system)) |
(let* ((type (coding-system-type coding-system)) |
623 |
(extra-spec (coding-system-extra-spec coding-system))) |
;; Fixme: use this |
624 |
|
(extra-spec (coding-system-plist coding-system))) |
625 |
(princ "Type: ") |
(princ "Type: ") |
626 |
(princ type) |
(princ type) |
627 |
(cond ((eq type 'undecided) |
(cond ((eq type 'undecided) |
654 |
((eq eol-type 1) (princ "CRLF\n")) |
((eq eol-type 1) (princ "CRLF\n")) |
655 |
((eq eol-type 2) (princ "CR\n")) |
((eq eol-type 2) (princ "CR\n")) |
656 |
(t (princ "invalid\n"))))) |
(t (princ "invalid\n"))))) |
657 |
(let ((postread (coding-system-get coding-system 'post-read-conversion))) |
(let ((postread (coding-system-get coding-system :post-read-conversion))) |
658 |
(when postread |
(when postread |
659 |
(princ "After decoding text normally,") |
(princ "After decoding text normally,") |
660 |
(princ " perform post-conversion using the function: ") |
(princ " perform post-conversion using the function: ") |
661 |
(princ "\n ") |
(princ "\n ") |
662 |
(princ postread) |
(princ postread) |
663 |
(princ "\n"))) |
(princ "\n"))) |
664 |
(let ((prewrite (coding-system-get coding-system 'pre-write-conversion))) |
(let ((prewrite (coding-system-get coding-system :pre-write-conversion))) |
665 |
(when prewrite |
(when prewrite |
666 |
(princ "Before encoding text normally,") |
(princ "Before encoding text normally,") |
667 |
(princ " perform pre-conversion using the function: ") |
(princ " perform pre-conversion using the function: ") |
669 |
(princ prewrite) |
(princ prewrite) |
670 |
(princ "\n"))) |
(princ "\n"))) |
671 |
(with-current-buffer standard-output |
(with-current-buffer standard-output |
672 |
(let ((charsets (coding-system-get coding-system 'safe-charsets))) |
(let ((charsets (coding-system-get coding-system :charset-list))) |
673 |
(when (and (not (memq (coding-system-base coding-system) |
(when (and (not (memq (coding-system-base coding-system) |
674 |
'(raw-text emacs-mule))) |
'(raw-text emacs-mule))) |
675 |
charsets) |
charsets) |
731 |
(coding-system-eol-type-mnemonic (cdr default-process-coding-system)) |
(coding-system-eol-type-mnemonic (cdr default-process-coding-system)) |
732 |
))) |
))) |
733 |
|
|
|
;; Print symbol name and mnemonic letter of CODING-SYSTEM with `princ'. |
|
734 |
(defun print-coding-system-briefly (coding-system &optional doc-string) |
(defun print-coding-system-briefly (coding-system &optional doc-string) |
735 |
|
"Print symbol name and mnemonic letter of CODING-SYSTEM with `princ'." |
736 |
(if (not coding-system) |
(if (not coding-system) |
737 |
(princ "nil\n") |
(princ "nil\n") |
738 |
(princ (format "%c -- %s" |
(princ (format "%c -- %s" |
788 |
(let ((aliases (coding-system-aliases elt))) |
(let ((aliases (coding-system-aliases elt))) |
789 |
(if (eq elt (car aliases)) |
(if (eq elt (car aliases)) |
790 |
(if (cdr aliases) |
(if (cdr aliases) |
791 |
|
;; Fixme: |
792 |
(princ (cons 'alias: (cdr base-aliases)))) |
(princ (cons 'alias: (cdr base-aliases)))) |
793 |
(princ (list 'alias 'of (car aliases)))) |
(princ (list 'alias 'of (car aliases)))) |
794 |
(terpri) |
(terpri) |
852 |
(funcall func "Network I/O" network-coding-system-alist)) |
(funcall func "Network I/O" network-coding-system-alist)) |
853 |
(help-mode)))) |
(help-mode)))) |
854 |
|
|
|
;; Print detailed information on CODING-SYSTEM. |
|
855 |
(defun print-coding-system (coding-system) |
(defun print-coding-system (coding-system) |
856 |
|
"Print detailed information on CODING-SYSTEM." |
857 |
(let ((type (coding-system-type coding-system)) |
(let ((type (coding-system-type coding-system)) |
858 |
(eol-type (coding-system-eol-type coding-system)) |
(eol-type (coding-system-eol-type coding-system)) |
859 |
(flags (coding-system-flags coding-system)) |
(flags (coding-system-flags coding-system)) |
987 |
|
|
988 |
;;; FONT |
;;; FONT |
989 |
|
|
|
;; Print information of a font in FONTINFO. |
|
990 |
(defun describe-font-internal (font-info &optional verbose) |
(defun describe-font-internal (font-info &optional verbose) |
991 |
|
"Print information about a font in FONT-INFO." |
992 |
(print-list "name (opened by):" (aref font-info 0)) |
(print-list "name (opened by):" (aref font-info 0)) |
993 |
(print-list " full name:" (aref font-info 1)) |
(print-list " full name:" (aref font-info 1)) |
994 |
(print-list " size:" (format "%2d" (aref font-info 2))) |
(print-list " size:" (format "%2d" (aref font-info 2))) |