760 |
))) |
))) |
761 |
|
|
762 |
;; Print symbol name and mnemonic letter of CODING-SYSTEM with `princ'. |
;; Print symbol name and mnemonic letter of CODING-SYSTEM with `princ'. |
763 |
|
;; If DOC-STRING is non-nil, print also the docstring of CODING-SYSTEM. |
764 |
|
;; If DOC-STRING is `tightly', don't print an empty line before the |
765 |
|
;; docstring, and print only the first line of the docstring. |
766 |
|
|
767 |
(defun print-coding-system-briefly (coding-system &optional doc-string) |
(defun print-coding-system-briefly (coding-system &optional doc-string) |
768 |
(if (not coding-system) |
(if (not coding-system) |
769 |
(princ "nil\n") |
(princ "nil\n") |
784 |
(not (eq coding-system (aref base-eol-type eol-type)))) |
(not (eq coding-system (aref base-eol-type eol-type)))) |
785 |
(princ (format " (alias of %s)" |
(princ (format " (alias of %s)" |
786 |
(aref base-eol-type eol-type)))))))) |
(aref base-eol-type eol-type)))))))) |
787 |
(princ "\n\n") |
(princ "\n") |
788 |
(if (and doc-string |
(or (eq doc-string 'tightly) |
789 |
(setq doc-string (coding-system-doc-string coding-system))) |
(princ "\n")) |
790 |
(princ (format "%s\n" doc-string))))) |
(if doc-string |
791 |
|
(let ((doc (or (coding-system-doc-string coding-system) ""))) |
792 |
|
(when (eq doc-string 'tightly) |
793 |
|
(if (string-match "\n" doc) |
794 |
|
(setq doc (substring doc 0 (match-beginning 0)))) |
795 |
|
(setq doc (concat " " doc))) |
796 |
|
(princ (format "%s\n" doc)))))) |
797 |
|
|
798 |
;;;###autoload |
;;;###autoload |
799 |
(defun describe-current-coding-system () |
(defun describe-current-coding-system () |
986 |
############################################### |
############################################### |
987 |
# List of coding systems in the following format: |
# List of coding systems in the following format: |
988 |
# MNEMONIC-LETTER -- CODING-SYSTEM-NAME |
# MNEMONIC-LETTER -- CODING-SYSTEM-NAME |
989 |
# DOC-STRING |
# DOC-STRING |
990 |
") |
") |
991 |
(princ "\ |
(princ "\ |
992 |
######################### |
######################### |
1013 |
## POST-READ-CONVERSION, PRE-WRITE-CONVERSION = function name to be called |
## POST-READ-CONVERSION, PRE-WRITE-CONVERSION = function name to be called |
1014 |
## |
## |
1015 |
")) |
")) |
1016 |
(let ((bases (coding-system-list 'base-only)) |
(dolist (coding-system (sort-coding-systems (coding-system-list 'base-only))) |
1017 |
coding-system) |
(if (null arg) |
1018 |
(while bases |
(print-coding-system-briefly coding-system 'tightly) |
1019 |
(setq coding-system (car bases)) |
(print-coding-system coding-system)))) |
|
(if (null arg) |
|
|
(print-coding-system-briefly coding-system 'doc-string) |
|
|
(print-coding-system coding-system)) |
|
|
(setq bases (cdr bases))))) |
|
1020 |
|
|
1021 |
;;;###autoload |
;;;###autoload |
1022 |
(defun list-coding-categories () |
(defun list-coding-categories () |