From: Stefan Kangas Date: Thu, 9 Jan 2025 01:54:08 +0000 (+0100) Subject: Improve 'gethash' docstring X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=68b3c15d4c4ab35e72f9bc1d77cf081d435773fd;p=emacs.git Improve 'gethash' docstring * src/fns.c (Fgethash): Improve docstring. Avoid exposing the C identifier 'dflt' to Lisp by providing a "usage:" string. (cherry picked from commit 40fbed939a254566f3bce50c6f16c21e5d2441ad) --- diff --git a/src/fns.c b/src/fns.c index ec0d7579aea..12c7fc017cd 100644 --- a/src/fns.c +++ b/src/fns.c @@ -5928,7 +5928,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);