diff options
| author | Stefan Kangas | 2025-03-07 18:10:53 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2025-03-07 18:13:52 +0100 |
| commit | af8017b23f6d94266dd05dcd084c8d7656393db8 (patch) | |
| tree | 56eac6415045193dc7ea539f1a784735127afabf /src | |
| parent | cf03c2b6093d3b555f758f033610a6015378de57 (diff) | |
| download | emacs-af8017b23f6d94266dd05dcd084c8d7656393db8.tar.gz emacs-af8017b23f6d94266dd05dcd084c8d7656393db8.zip | |
Explicitly document read-string return value
* src/minibuf.c (Fread_string): Document return value explicitly.
Better document PROMPT argument, and reflow docstring. (Bug#76797)
Diffstat (limited to 'src')
| -rw-r--r-- | src/minibuf.c | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index bf9fad48d88..026a8f4271e 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -1402,20 +1402,28 @@ and some related functions, which use zero-indexing for POSITION. */) | |||
| 1402 | /* Functions that use the minibuffer to read various things. */ | 1402 | /* Functions that use the minibuffer to read various things. */ |
| 1403 | 1403 | ||
| 1404 | DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, | 1404 | DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, |
| 1405 | doc: /* Read a string from the minibuffer, prompting with string PROMPT. | 1405 | doc: /* Read and return a string from the minibuffer, prompting with PROMPT. |
| 1406 | If non-nil, second arg INITIAL-INPUT is a string to insert before reading. | 1406 | |
| 1407 | This argument has been superseded by DEFAULT-VALUE and should normally be nil | 1407 | PROMPT is a string, which should normally end with the string ": ". |
| 1408 | in new code. It behaves as INITIAL-CONTENTS in `read-from-minibuffer' (which | 1408 | |
| 1409 | see). | 1409 | If non-nil, second arg INITIAL-INPUT is a string to insert before |
| 1410 | The third arg HISTORY, if non-nil, specifies a history list | 1410 | reading. This argument has been superseded by DEFAULT-VALUE and should |
| 1411 | and optionally the initial position in the list. | 1411 | normally be nil in new code. It behaves as INITIAL-CONTENTS in |
| 1412 | `read-from-minibuffer' (which see). | ||
| 1413 | |||
| 1414 | The third arg HISTORY, if non-nil, specifies a history list and | ||
| 1415 | optionally the initial position in the list. | ||
| 1416 | |||
| 1412 | See `read-from-minibuffer' for details of HISTORY argument. | 1417 | See `read-from-minibuffer' for details of HISTORY argument. |
| 1413 | Fourth arg DEFAULT-VALUE is the default value or the list of default values. | 1418 | |
| 1414 | If non-nil, it is used for history commands, and as the value (or the first | 1419 | Fourth arg DEFAULT-VALUE is the default value or the list of default |
| 1415 | element of the list of default values) to return if the user enters the | 1420 | values. If non-nil, it is used for history commands, and as the value |
| 1416 | empty string. | 1421 | (or the first element of the list of default values) to return if the |
| 1417 | Fifth arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits | 1422 | user enters the empty string. |
| 1418 | the current input method and the setting of `enable-multibyte-characters'. */) | 1423 | |
| 1424 | Fifth arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer | ||
| 1425 | inherits the current input method and the setting of | ||
| 1426 | `enable-multibyte-characters'. */) | ||
| 1419 | (Lisp_Object prompt, Lisp_Object initial_input, Lisp_Object history, Lisp_Object default_value, Lisp_Object inherit_input_method) | 1427 | (Lisp_Object prompt, Lisp_Object initial_input, Lisp_Object history, Lisp_Object default_value, Lisp_Object inherit_input_method) |
| 1420 | { | 1428 | { |
| 1421 | Lisp_Object val; | 1429 | Lisp_Object val; |