Function: read-charset

read-charset is an autoloaded and byte-compiled function defined in mule-diag.el.gz.

Signature

(read-charset PROMPT &optional DEFAULT-VALUE INITIAL-INPUT)

Documentation

Read a character set from the minibuffer, prompting with string PROMPT.

It must be an Emacs character set listed in the variable charset-list.

Optional arguments are DEFAULT-VALUE and INITIAL-INPUT. DEFAULT-VALUE, if non-nil, is the default value. INITIAL-INPUT, if non-nil, is a string inserted in the minibuffer initially. See the documentation of the function completing-read for the detailed meanings of these arguments.

Source Code

;; Defined in /usr/src/emacs/lisp/international/mule-diag.el.gz
;;;###autoload
(defun read-charset (prompt &optional default-value initial-input)
  "Read a character set from the minibuffer, prompting with string PROMPT.
It must be an Emacs character set listed in the variable `charset-list'.

Optional arguments are DEFAULT-VALUE and INITIAL-INPUT.
DEFAULT-VALUE, if non-nil, is the default value.
INITIAL-INPUT, if non-nil, is a string inserted in the minibuffer initially.
See the documentation of the function `completing-read' for the detailed
meanings of these arguments."
  (let* ((table (mapcar (lambda (x) (list (symbol-name x))) charset-list))
	 (charset (completing-read prompt table
				   nil t initial-input 'charset-history
				   default-value)))
    (if (> (length charset) 0)
	(intern charset))))