diff options
| author | Dave Love | 2002-05-19 11:16:59 +0000 |
|---|---|---|
| committer | Dave Love | 2002-05-19 11:16:59 +0000 |
| commit | 9be334343980572da51ec499beee9b82c74f7f57 (patch) | |
| tree | 96751ae67ef2977a059d19c7589a405829b2e6a8 | |
| parent | 7e8b4d677a8986a502b0992b222a8357efca5b9c (diff) | |
| download | emacs-9be334343980572da51ec499beee9b82c74f7f57.tar.gz emacs-9be334343980572da51ec499beee9b82c74f7f57.zip | |
(describe-coding-system): Avoid error
for iso-2022, emacs-mule.
| -rw-r--r-- | lisp/international/mule-diag.el | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index de993627374..35659934c0b 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el | |||
| @@ -496,10 +496,11 @@ which font is being used for displaying the character." | |||
| 496 | 496 | ||
| 497 | ;;; CODING-SYSTEM | 497 | ;;; CODING-SYSTEM |
| 498 | 498 | ||
| 499 | ;; Fixme | ||
| 500 | (defun print-designation (charset-list initial request) | ||
| 499 | ;; Print information of designation of each graphic register in FLAGS | 501 | ;; Print information of designation of each graphic register in FLAGS |
| 500 | ;; in human readable format. See the documentation of | 502 | ;; in human readable format. See the documentation of |
| 501 | ;; `make-coding-system' for the meaning of FLAGS. | 503 | ;; `make-coding-system' for the meaning of FLAGS. |
| 502 | (defun print-designation (charset-list initial request) | ||
| 503 | (let ((gr (make-vector 4 nil)) | 504 | (let ((gr (make-vector 4 nil)) |
| 504 | charset) | 505 | charset) |
| 505 | (dotimes (i 4) | 506 | (dotimes (i 4) |
| @@ -579,17 +580,21 @@ which font is being used for displaying the character." | |||
| 579 | (princ " (Shift-JIS, MS-KANJI)")) | 580 | (princ " (Shift-JIS, MS-KANJI)")) |
| 580 | ((eq type 'iso-2022) | 581 | ((eq type 'iso-2022) |
| 581 | (princ " (variant of ISO-2022)\n") | 582 | (princ " (variant of ISO-2022)\n") |
| 582 | (princ "Initial designations:\n") | 583 | ;; Fixme: |
| 583 | (print-designation (coding-system-charset-list coding-system) | 584 | ;; (princ "Initial designations:\n") |
| 584 | (aref extra-spec 0) (aref extra-spec 1)) | 585 | ;; (print-designation (coding-system-charset-list coding-system) |
| 585 | (print-iso-2022-flags (aref extra-spec 2)) | 586 | ;; (aref extra-spec 0) (aref extra-spec 1)) |
| 586 | (princ ".")) | 587 | ;; (print-iso-2022-flags (aref extra-spec 2)) |
| 588 | ;; (princ ".") | ||
| 589 | ) | ||
| 587 | ((eq type 'charset) | 590 | ((eq type 'charset) |
| 588 | (princ " (charset)")) | 591 | (princ " (charset)")) |
| 589 | ((eq type 'ccl) | 592 | ((eq type 'ccl) |
| 590 | (princ " (do conversion by CCL program)")) | 593 | (princ " (do conversion by CCL program)")) |
| 591 | ((eq type 'raw-text) | 594 | ((eq type 'raw-text) |
| 592 | (princ " (text with random binary characters)")) | 595 | (princ " (text with random binary characters)")) |
| 596 | ((eq type 'emacs-mule) | ||
| 597 | (princ " (Emacs 21 internal encoding)")) | ||
| 593 | (t (princ ": invalid coding-system."))) | 598 | (t (princ ": invalid coding-system."))) |
| 594 | (princ "\nEOL type: ") | 599 | (princ "\nEOL type: ") |
| 595 | (let ((eol-type (coding-system-eol-type coding-system))) | 600 | (let ((eol-type (coding-system-eol-type coding-system))) |
| @@ -616,21 +621,23 @@ which font is being used for displaying the character." | |||
| 616 | (princ prewrite) | 621 | (princ prewrite) |
| 617 | (princ "\n"))) | 622 | (princ "\n"))) |
| 618 | (with-current-buffer standard-output | 623 | (with-current-buffer standard-output |
| 619 | (let ((charsets (coding-system-get coding-system :charset-list))) | 624 | (let ((charsets (coding-system-charset-list coding-system))) |
| 620 | (when (and (not (memq (coding-system-base coding-system) | 625 | (when (and (not (eq (coding-system-base coding-system) 'raw-text)) |
| 621 | '(raw-text emacs-mule))) | ||
| 622 | charsets) | 626 | charsets) |
| 623 | (if (eq charsets t) | 627 | (cond |
| 624 | (insert "This coding system can encode all charsets except for | 628 | ((eq charsets 'iso-2022) |
| 625 | eight-bit-control and eight-bit-graphic.\n") | 629 | (insert "This coding system can encode all ISO 2022 charsets.")) |
| 630 | ((eq charsets 'emacs-mule) | ||
| 631 | (insert "This coding system can encode all emacs-mule charsets\ | ||
| 632 | .""")) | ||
| 633 | (t | ||
| 626 | (insert "This coding system encodes the following charsets:\n ") | 634 | (insert "This coding system encodes the following charsets:\n ") |
| 627 | (while charsets | 635 | (while charsets |
| 628 | (insert " " (symbol-name (car charsets))) | 636 | (insert " " (symbol-name (car charsets))) |
| 629 | (search-backward (symbol-name (car charsets))) | 637 | (search-backward (symbol-name (car charsets))) |
| 630 | (help-xref-button 0 'help-character-set (car charsets)) | 638 | (help-xref-button 0 'help-character-set (car charsets)) |
| 631 | (goto-char (point-max)) | 639 | (goto-char (point-max)) |
| 632 | (setq charsets (cdr charsets)))))))))) | 640 | (setq charsets (cdr charsets))))))))))) |
| 633 | |||
| 634 | 641 | ||
| 635 | ;;;###autoload | 642 | ;;;###autoload |
| 636 | (defun describe-current-coding-system-briefly () | 643 | (defun describe-current-coding-system-briefly () |