[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);
- [Emacs-diffs] branch scratch/record created (now f23d5d7), Lars Brinkhoff, 2017/03/19
- [Emacs-diffs] scratch/record 88e7f6f 07/12: Better doc string for `old-struct-compat'., Lars Brinkhoff, 2017/03/19
- [Emacs-diffs] scratch/record 445db82 05/12: Backward compatibility with pre-existing struct instances., Lars Brinkhoff, 2017/03/19
- [Emacs-diffs] scratch/record 1682496 06/12: Use sizeof to get length of cl-struct prefix., Lars Brinkhoff, 2017/03/19
- [Emacs-diffs] scratch/record 2068bed 01/12: Add record objects with user-defined types., Lars Brinkhoff, 2017/03/19
- [Emacs-diffs] scratch/record 27b4a7b 04/12: Test cases., Lars Brinkhoff, 2017/03/19
- [Emacs-diffs] scratch/record 869239a 02/12: Update cl-defstruct to use records., Lars Brinkhoff, 2017/03/19
- [Emacs-diffs] scratch/record e8ec4b7 10/12: Fix cl-print-object to find the object class the new way., Lars Brinkhoff, 2017/03/19
- [Emacs-diffs] scratch/record e4a5289 09/12: Make it possible to compare records with `equal'., Lars Brinkhoff, 2017/03/19
- [Emacs-diffs] scratch/record c235473 11/12: Make a note that CHECK_RECORD_TYPE is a work in progress., Lars Brinkhoff, 2017/03/19
- [Emacs-diffs] scratch/record 46d5ea1 08/12: Better doc strings for `make-record', `record', and `copy-record'.,
Lars Brinkhoff <=
- [Emacs-diffs] scratch/record f23d5d7 12/12: Signal errors from APIs., Lars Brinkhoff, 2017/03/19
- [Emacs-diffs] scratch/record b84c1ad 03/12: Make EIEIO use records., Lars Brinkhoff, 2017/03/19