Improve documentation of 'read-command'
* src/minibuf.c (Fread_command): Document the return value when DEFAULT-VALUE is nil and the user enters nothing. * doc/lispref/minibuf.texi (High-Level Completion): Document the printed representation of a symbol whose name is empty. (Bug#3522)
This commit is contained in:
parent
dc81c051ec
commit
85829363f7
2 changed files with 4 additions and 2 deletions
|
@ -1327,7 +1327,8 @@ is a string, @code{read-command} interns it before returning it.
|
||||||
If it is a list, @code{read-command} interns the first element of this list.
|
If it is a list, @code{read-command} interns the first element of this list.
|
||||||
If @var{default} is @code{nil}, that means no default has been
|
If @var{default} is @code{nil}, that means no default has been
|
||||||
specified; then if the user enters null input, the return value is
|
specified; then if the user enters null input, the return value is
|
||||||
@code{(intern "")}, that is, a symbol whose name is an empty string.
|
@code{(intern "")}, that is, a symbol whose name is an empty string,
|
||||||
|
and whose printed representation is @code{##} (@pxref{Symbol Type}).
|
||||||
|
|
||||||
@example
|
@example
|
||||||
(read-command "Command name? ")
|
(read-command "Command name? ")
|
||||||
|
|
|
@ -1054,7 +1054,8 @@ the current input method and the setting of`enable-multibyte-characters'. */)
|
||||||
DEFUN ("read-command", Fread_command, Sread_command, 1, 2, 0,
|
DEFUN ("read-command", Fread_command, Sread_command, 1, 2, 0,
|
||||||
doc: /* Read the name of a command and return as a symbol.
|
doc: /* Read the name of a command and return as a symbol.
|
||||||
Prompt with PROMPT. By default, return DEFAULT-VALUE or its first element
|
Prompt with PROMPT. By default, return DEFAULT-VALUE or its first element
|
||||||
if it is a list. */)
|
if it is a list. If DEFAULT-VALUE is omitted or nil, and the user enters
|
||||||
|
null input, return a symbol whose name is an empty string. */)
|
||||||
(Lisp_Object prompt, Lisp_Object default_value)
|
(Lisp_Object prompt, Lisp_Object default_value)
|
||||||
{
|
{
|
||||||
Lisp_Object name, default_string;
|
Lisp_Object name, default_string;
|
||||||
|
|
Loading…
Add table
Reference in a new issue