Function: read-coding-system
read-coding-system is a function defined in coding.c.
Signature
(read-coding-system PROMPT &optional DEFAULT-CODING-SYSTEM)
Documentation
Read a coding system from the minibuffer, prompting with string PROMPT.
If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. Return the coding-system's symbol, or nil if both the user input and DEFAULT-CODING-SYSTEM are empty or null. Ignores case when completing coding systems (all Emacs coding systems are lower-case).
Source Code
// Defined in /usr/src/emacs/src/coding.c
{
Lisp_Object val;
specpdl_ref count = SPECPDL_INDEX ();
if (SYMBOLP (default_coding_system))
default_coding_system = SYMBOL_NAME (default_coding_system);
specbind (Qcompletion_ignore_case, Qt);
val = Fcompleting_read (prompt, Vcoding_system_alist, Qnil,
Qt, Qnil, Qcoding_system_history,
default_coding_system, Qnil);
val = unbind_to (count, val);
return (SCHARS (val) == 0 ? Qnil : Fintern (val, Qnil));
}