diff options
| author | Kenichi Handa | 1997-10-21 10:47:35 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-10-21 10:47:35 +0000 |
| commit | ff8909d81d5b2f7886124072415ee6a20d51ac25 (patch) | |
| tree | 06009a386b7b5ab853cf811a2df8cfee61c84932 /lisp | |
| parent | f1fd88c6acf17dc1715bf752b7410ba19c383c16 (diff) | |
| download | emacs-ff8909d81d5b2f7886124072415ee6a20d51ac25.tar.gz emacs-ff8909d81d5b2f7886124072415ee6a20d51ac25.zip | |
(describe-coding-system): Print
informatoin about coding system properties, post-read-conversion
and pre-write-conversion.
(print-coding-system-briefly): Adjusted for the change in mule.el.
(describe-current-coding-system): Likewise.
(print-coding-system): Likewise.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/international/mule-diag.el | 52 |
1 files changed, 37 insertions, 15 deletions
diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 0f74a10614e..8966b26e0ba 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el | |||
| @@ -199,6 +199,20 @@ but contains full information about each character sets." | |||
| 199 | ((eq eol-type 1) (princ "CRLF\n")) | 199 | ((eq eol-type 1) (princ "CRLF\n")) |
| 200 | ((eq eol-type 2) (princ "CR\n")) | 200 | ((eq eol-type 2) (princ "CR\n")) |
| 201 | (t (princ "invalid\n"))))) | 201 | (t (princ "invalid\n"))))) |
| 202 | (let ((postread (coding-system-get coding-system 'post-read-conversion))) | ||
| 203 | (when postread | ||
| 204 | (princ "After decoding a text normally,") | ||
| 205 | (princ " perform post-conversion by the function: ") | ||
| 206 | (princ "\n ") | ||
| 207 | (princ postread) | ||
| 208 | (princ "\n"))) | ||
| 209 | (let ((prewrite (coding-system-get coding-system 'pre-write-conversion))) | ||
| 210 | (when prewrite | ||
| 211 | (princ "Before encoding a text normally,") | ||
| 212 | (princ " perform pre-conversion by the function: ") | ||
| 213 | (princ "\n ") | ||
| 214 | (princ prewrite) | ||
| 215 | (princ "\n"))) | ||
| 202 | (save-excursion | 216 | (save-excursion |
| 203 | (set-buffer standard-output) | 217 | (set-buffer standard-output) |
| 204 | (help-mode))))) | 218 | (help-mode))))) |
| @@ -256,12 +270,12 @@ at the place of `..': | |||
| 256 | (princ (format "%c -- %s" | 270 | (princ (format "%c -- %s" |
| 257 | (coding-system-mnemonic coding-system) | 271 | (coding-system-mnemonic coding-system) |
| 258 | coding-system)) | 272 | coding-system)) |
| 259 | (let ((parent (coding-system-parent coding-system))) | 273 | (let ((aliases (coding-system-get coding-system 'alias-coding-systems))) |
| 260 | (if parent | 274 | (if (eq coding-system (car aliases)) |
| 261 | (princ (format " (alias of %s)" parent)))) | 275 | (if (cdr aliases) |
| 262 | (let ((aliases (get coding-system 'alias-coding-systems))) | 276 | (princ (format " %S" (cons 'alias: (cdr aliases))))) |
| 263 | (if aliases | 277 | (if (memq coding-system aliases) |
| 264 | (princ (format " %S" (cons 'alias: aliases))))) | 278 | (princ (format " (alias of %s)" (car aliases)))))) |
| 265 | (princ "\n") | 279 | (princ "\n") |
| 266 | (if (and doc-string | 280 | (if (and doc-string |
| 267 | (setq doc-string (coding-system-doc-string coding-system))) | 281 | (setq doc-string (coding-system-doc-string coding-system))) |
| @@ -306,15 +320,20 @@ at the place of `..': | |||
| 306 | coding aliases) | 320 | coding aliases) |
| 307 | (while l | 321 | (while l |
| 308 | (setq coding (symbol-value (car l))) | 322 | (setq coding (symbol-value (car l))) |
| 323 | ;; Do not list up the same coding system twice. | ||
| 309 | (when (not (memq coding coding-list)) | 324 | (when (not (memq coding coding-list)) |
| 310 | (setq coding-list (cons coding coding-list)) | 325 | (setq coding-list (cons coding coding-list)) |
| 311 | (princ (format " %d. %s" i coding)) | 326 | (princ (format " %d. %s " i coding)) |
| 312 | (when (setq aliases (get coding 'alias-coding-systems)) | 327 | (setq aliases (coding-system-get coding 'alias-coding-systems)) |
| 313 | (princ " ") | 328 | (if (eq coding (car aliases)) |
| 314 | (princ (cons 'alias: aliases))) | 329 | (if (cdr aliases) |
| 330 | (princ (cons 'alias: (cdr aliases)))) | ||
| 331 | (if (memq coding aliases) | ||
| 332 | (princ (list 'alias 'of (car aliases))))) | ||
| 315 | (terpri) | 333 | (terpri) |
| 316 | (setq i (1+ i))) | 334 | (setq i (1+ i))) |
| 317 | (setq l (cdr l)))) | 335 | (setq l (cdr l)))) |
| 336 | |||
| 318 | (princ "\n Other coding systems cannot be distinguished automatically | 337 | (princ "\n Other coding systems cannot be distinguished automatically |
| 319 | from these, and therefore cannot be recognized automatically | 338 | from these, and therefore cannot be recognized automatically |
| 320 | with the present coding system priorities.\n\n") | 339 | with the present coding system priorities.\n\n") |
| @@ -327,7 +346,7 @@ at the place of `..': | |||
| 327 | (function | 346 | (function |
| 328 | (lambda (x) | 347 | (lambda (x) |
| 329 | (if (and (not (eq x coding-system)) | 348 | (if (and (not (eq x coding-system)) |
| 330 | (get x 'no-initial-designation) | 349 | (coding-system-get x 'no-initial-designation) |
| 331 | (let ((flags (coding-system-flags x))) | 350 | (let ((flags (coding-system-flags x))) |
| 332 | (not (or (aref flags 10) (aref flags 11))))) | 351 | (not (or (aref flags 10) (aref flags 11))))) |
| 333 | (setq codings (cons x codings))))) | 352 | (setq codings (cons x codings))))) |
| @@ -359,6 +378,8 @@ at the place of `..': | |||
| 359 | (while alist | 378 | (while alist |
| 360 | (indent-to 16) | 379 | (indent-to 16) |
| 361 | (prin1 (car (car alist))) | 380 | (prin1 (car (car alist))) |
| 381 | (if (>= (current-column) 40) | ||
| 382 | (newline)) | ||
| 362 | (indent-to 40) | 383 | (indent-to 40) |
| 363 | (princ (cdr (car alist))) | 384 | (princ (cdr (car alist))) |
| 364 | (princ "\n") | 385 | (princ "\n") |
| @@ -369,14 +390,15 @@ at the place of `..': | |||
| 369 | (help-mode)))) | 390 | (help-mode)))) |
| 370 | 391 | ||
| 371 | ;; Print detailed information on CODING-SYSTEM. | 392 | ;; Print detailed information on CODING-SYSTEM. |
| 372 | (defun print-coding-system (coding-system &optional aliases) | 393 | (defun print-coding-system (coding-system) |
| 373 | (let ((type (coding-system-type coding-system)) | 394 | (let ((type (coding-system-type coding-system)) |
| 374 | (eol-type (coding-system-eol-type coding-system)) | 395 | (eol-type (coding-system-eol-type coding-system)) |
| 375 | (flags (coding-system-flags coding-system)) | 396 | (flags (coding-system-flags coding-system)) |
| 376 | (base (coding-system-base coding-system))) | 397 | (aliases (coding-system-get coding-system 'alias-coding-systems))) |
| 377 | (if (not (eq base coding-system)) | 398 | (if (not (eq (car aliases) coding-system)) |
| 378 | (princ (format "%s (alias of %s)\n" coding-system base)) | 399 | (princ (format "%s (alias of %s)\n" coding-system (car aliases))) |
| 379 | (princ coding-system) | 400 | (princ coding-system) |
| 401 | (setq aliases (cdr aliases)) | ||
| 380 | (while aliases | 402 | (while aliases |
| 381 | (princ ",") | 403 | (princ ",") |
| 382 | (princ (car aliases)) | 404 | (princ (car aliases)) |