Improve 'gethash' docstring

* src/fns.c (Fgethash): Improve docstring.  Avoid exposing the C
identifier 'dflt' to Lisp by providing a "usage:" string.
This commit is contained in:
Stefan Kangas 2025-01-09 02:54:08 +01:00
parent bdccd4ea9e
commit 40fbed939a

View file

@ -5931,7 +5931,10 @@ DEFUN ("clrhash", Fclrhash, Sclrhash, 1, 1, 0,
DEFUN ("gethash", Fgethash, Sgethash, 2, 3, 0,
doc: /* Look up KEY in TABLE and return its associated value.
If KEY is not found, return DFLT which defaults to nil. */)
If KEY is not found in table, return DEFAULT, or nil if DEFAULT is not
provided.
usage: (gethash KEY TABLE &optional DEFAULT) */)
(Lisp_Object key, Lisp_Object table, Lisp_Object dflt)
{
struct Lisp_Hash_Table *h = check_hash_table (table);