Function: describe-character-set
describe-character-set is an autoloaded, interactive and byte-compiled
function defined in mule-diag.el.gz.
Signature
(describe-character-set CHARSET)
Documentation
Display information about built-in character set CHARSET.
Probably introduced at or before Emacs version 21.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/international/mule-diag.el.gz
;;;###autoload
(defun describe-character-set (charset)
"Display information about built-in character set CHARSET."
(interactive (list (read-charset "Charset: ")))
(or (charsetp charset)
(error "Invalid charset: %S" charset))
(help-setup-xref (list #'describe-character-set charset)
(called-interactively-p 'interactive))
(with-output-to-temp-buffer (help-buffer)
(with-current-buffer standard-output
(insert "Character set: " (symbol-name charset))
(let ((name (get-charset-property charset :name)))
(if (not (eq name charset))
(insert " (alias of " (symbol-name name) ?\))))
(insert "\n\n" (charset-description charset) "\n\n")
(insert "Number of contained characters: ")
(dotimes (i (charset-dimension charset))
(unless (= i 0)
(insert ?x))
(insert (format "%d" (charset-chars charset (1+ i)))))
(insert ?\n)
(let ((char (charset-iso-final-char charset)))
(when (> char 0)
(insert "Final char of ISO2022 designation sequence: ")
(insert (format-message "`%c'\n" char))))
(let (aliases)
(dolist (c charset-list)
(if (and (not (eq c charset))
(eq charset (get-charset-property c :name)))
(push c aliases)))
(if aliases
(insert "Aliases: " (mapconcat #'symbol-name aliases ", ") ?\n)))
(dolist (elt `((:ascii-compatible-p "ASCII compatible." nil)
(:map "Map file: " identity)
(:unify-map "Unification map file: " identity)
(:invalid-code
nil
,(lambda (c)
(format "Invalid character: %c (code %d)" c c)))
(:emacs-mule-id "Id in emacs-mule coding system: "
number-to-string)
(:parents "Parents: "
(lambda (parents)
(mapconcat ,(lambda (elt)
(format "%s" elt))
parents
", ")))
(:code-space "Code space: " ,(lambda (c)
(format "%s" c)))
(:code-offset "Code offset: " number-to-string)
(:iso-revision-number "ISO revision number: "
number-to-string)
(:supplementary-p
"Used only as a parent or a subset of some other charset,
or provided just for backward compatibility." nil)))
(let ((val (get-charset-property charset (car elt))))
(when val
(if (cadr elt) (insert (cadr elt)))
(if (nth 2 elt)
(let ((print-length 10) (print-level 2))
(princ (funcall (nth 2 elt) val) (current-buffer))))
(insert ?\n)))))))