[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 8582936: Improve documentation of 'read-command'
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 8582936: Improve documentation of 'read-command' |
Date: |
Thu, 11 Apr 2019 10:01:54 -0400 (EDT) |
branch: emacs-26
commit 85829363f728c410e33ffdc3839202977b2115cc
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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)
---
doc/lispref/minibuf.texi | 3 ++-
src/minibuf.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 796be07..3a2a9d8 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -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 @var{default} is @code{nil}, that means no default has been
specified; then if the user enters null input, the return value is
address@hidden(intern "")}, that is, a symbol whose name is an empty string.
address@hidden(intern "")}, that is, a symbol whose name is an empty string,
+and whose printed representation is @code{##} (@pxref{Symbol Type}).
@example
(read-command "Command name? ")
diff --git a/src/minibuf.c b/src/minibuf.c
index 6964f35..a33ddf4 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -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,
doc: /* Read the name of a command and return as a symbol.
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 name, default_string;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 8582936: Improve documentation of 'read-command',
Eli Zaretskii <=