emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/record 46d5ea1 08/12: Better doc strings for `make


From: Lars Brinkhoff
Subject: [Emacs-diffs] scratch/record 46d5ea1 08/12: Better doc strings for `make-record', `record', and `copy-record'.
Date: Sun, 19 Mar 2017 16:04:20 -0400 (EDT)

branch: scratch/record
commit 46d5ea1db2d724a8d41befe04860fdf93f9933e6
Author: Lars Brinkhoff <address@hidden>
Commit: Lars Brinkhoff <address@hidden>

    Better doc strings for `make-record', `record', and `copy-record'.
---
 src/alloc.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index 14a179f..1a3a38e 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3406,7 +3406,10 @@ allocate_record (int count)
 
 
 DEFUN ("make-record", Fmake_record, Smake_record, 3, 3, 0,
-       doc: /* Create a new record of type TYPE with SLOTS elements, each 
initialized to INIT.  */)
+       doc: /* Create a new record.
+TYPE is its type as returned by `type-of'.  SLOTS is the number of
+slots, each initialized to INIT.  The number of slots, including the
+type slot, must fit in PSEUDOVECTOR_SIZE_BITS.  */)
   (Lisp_Object type, Lisp_Object slots, Lisp_Object init)
 {
   Lisp_Object record;
@@ -3428,9 +3431,12 @@ DEFUN ("make-record", Fmake_record, Smake_record, 3, 3, 
0,
 
 
 DEFUN ("record", Frecord, Srecord, 1, MANY, 0,
-       doc: /* Return a newly created record of type TYPE the rest of the 
arguments as slots.
-Any number of slots, even zero slots, are allowed.
-usage: (record TYPE &rest SLOTS)  */)
+       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.  The
+number of slots, including the type slot, must fit in
+PSEUDOVECTOR_SIZE_BITS.
+usage: (record TYPE &rest SLOTS) */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {
   struct Lisp_Vector *p = allocate_record (nargs);
@@ -3447,7 +3453,7 @@ usage: (record TYPE &rest SLOTS)  */)
 
 
 DEFUN ("copy-record", Fcopy_record, Scopy_record, 1, 1, 0,
-       doc: /* Shallow copy of a record.  */)
+       doc: /* Return a new record that is a shallow copy of the argument 
RECORD.  */)
   (Lisp_Object record)
 {
   CHECK_RECORD (record);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]