From 59d1aac49dfdc49e34be5964f547db0cfa7e127b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii <eliz@gnu.org> Date: Sun, 9 Mar 2025 15:02:39 +0200 Subject: Document return values of the various read-* functions * lisp/textmodes/string-edit.el (read-string-from-buffer): * lisp/simple.el (read-from-kill-ring, read-shell-command) (read-signal-name): * lisp/replace.el (read-regexp-case-fold-search): * lisp/auth-source.el (read-passwd): * lisp/subr.el (read-key, read-number): * lisp/minibuffer.el (read-file-name, read-no-blanks-input): * lisp/international/mule-cmds.el (read-multilingual-string): * lisp/language/japan-util.el (read-hiragana-string): * lisp/files-x.el (read-file-local-variable) (read-file-local-variable-mode, read-file-local-variable-value): * lisp/faces.el (read-face-font, read-face-name): * lisp/simple.el (read-extended-command): * lisp/env.el (read-envvar-name): * lisp/files.el (read-directory-name): * lisp/faces.el (read-color): * lisp/international/mule-diag.el (read-charset): * lisp/emacs-lisp/map-ynp.el (read-answer): * src/coding.c (Fread_coding_system) (Fread_non_nil_coding_system): * src/minibuf.c (Fread_command, Fread_from_minibuffer): * src/lread.c (Fread_char, Fread_char_exclusive, Fread_event): Doc fixes. --- lisp/subr.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/subr.el') diff --git a/lisp/subr.el b/lisp/subr.el index 37a3f9efe6b..42706397674 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3309,7 +3309,7 @@ miscellaneous values associated with the process." (defvar read-key-delay 0.01) ;Fast enough for 100Hz repeat rate, hopefully. (defun read-key (&optional prompt disable-fallbacks) - "Read a key from the keyboard. + "Read a key from the keyboard, return the event thus read. Contrary to `read-event' this will not return a raw event but instead will obey the input decoding and translations usually done by `read-key-sequence'. So escape sequences and keyboard encoding are taken into account. @@ -3423,7 +3423,7 @@ with Emacs. Do not call it directly in your own packages." "The default history for the `read-number' function.") (defun read-number (prompt &optional default hist) - "Read a numeric value in the minibuffer, prompting with PROMPT. + "Read from the minibuffer and return a numeric value, prompting with PROMPT. DEFAULT specifies a default value to return if the user just types RET. For historical reasons, the value of DEFAULT is always inserted into PROMPT, so it's recommended to use `format' instead of `format-prompt' -- cgit v1.2.3