summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorLars Brinkhoff <lars@nocrew.org>2017-04-05 08:42:25 +0200
committerLars Brinkhoff <lars@nocrew.org>2017-04-06 20:30:28 +0200
commit4753f3f0af33c5defe3a340f82265db6a6863030 (patch)
treead48b75c21ba2c822904971bf4909ba0626f4014 /src/alloc.c
parente3eea9a4b449c87a3bb022098a9e6f1bda805cb3 (diff)
downloademacs-4753f3f0af33c5defe3a340f82265db6a6863030.tar.gz
Update documentation for type semantics of records.
* objects.texi (Record Type): improve description of what `type-of' returns for records. (Type Descriptors): new section. * elisp.texi: reference it. * records.texi (Records): reference it. Document behaviour when type slot is a record. * alloc.c (Fmake_record, Frecord): mention type desciptors.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/alloc.c b/src/alloc.c
index a58824fb0f3..fad84b8a0b3 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3411,8 +3411,9 @@ allocate_record (EMACS_INT count)
DEFUN ("make-record", Fmake_record, Smake_record, 3, 3, 0,
doc: /* Create a new record.
-TYPE is its type as returned by `type-of'. SLOTS is the number of
-non-type slots, each initialized to INIT. */)
+TYPE is its type as returned by `type-of'; it should be either a
+symbol or a type descriptor. SLOTS is the number of non-type slots,
+each initialized to INIT. */)
(Lisp_Object type, Lisp_Object slots, Lisp_Object init)
{
CHECK_NATNUM (slots);
@@ -3427,8 +3428,9 @@ non-type slots, each initialized to INIT. */)
DEFUN ("record", Frecord, Srecord, 1, MANY, 0,
doc: /* Create a new record.
-TYPE is its type as returned by `type-of'. SLOTS is used to
-initialize the record slots with shallow copies of the arguments.
+TYPE is its type as returned by `type-of'; it should be either a
+symbol or a type descriptor. SLOTS is used to initialize the record
+slots with shallow copies of the arguments.
usage: (record TYPE &rest SLOTS) */)
(ptrdiff_t nargs, Lisp_Object *args)
{