[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/record db8ff08 08/13: Better doc strings for `make
From: |
Lars Brinkhoff |
Subject: |
[Emacs-diffs] scratch/record db8ff08 08/13: Better doc strings for `make-record', `record', and `copy-record'. |
Date: |
Mon, 20 Mar 2017 16:11:09 -0400 (EDT) |
branch: scratch/record
commit db8ff08a7bf404db99cf74b153fde26d3d3df0ea
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] scratch/record 29d7fef 03/13: Make EIEIO use records., (continued)
- [Emacs-diffs] scratch/record 29d7fef 03/13: Make EIEIO use records., Lars Brinkhoff, 2017/03/20
- [Emacs-diffs] scratch/record fff19c5 06/13: Use sizeof to get length of cl-struct prefix., Lars Brinkhoff, 2017/03/20
- [Emacs-diffs] scratch/record 6450a4c 07/13: Better doc string for `old-struct-compat'., Lars Brinkhoff, 2017/03/20
- [Emacs-diffs] scratch/record 953ceab 10/13: Fix cl-print-object to find the object class the new way., Lars Brinkhoff, 2017/03/20
- [Emacs-diffs] scratch/record 18e3aac 01/13: Add record objects with user-defined types., Lars Brinkhoff, 2017/03/20
- [Emacs-diffs] scratch/record f6e4882 11/13: Make a note that CHECK_RECORD_TYPE is a work in progress., Lars Brinkhoff, 2017/03/20
- [Emacs-diffs] scratch/record 9122e24 12/13: Signal errors from APIs., Lars Brinkhoff, 2017/03/20
- [Emacs-diffs] scratch/record be8079b 05/13: Backward compatibility with pre-existing struct instances., Lars Brinkhoff, 2017/03/20
- [Emacs-diffs] scratch/record 91584a7 09/13: Make it possible to compare records with `equal'., Lars Brinkhoff, 2017/03/20
- [Emacs-diffs] scratch/record dbb4691 13/13: Enable legacy defstruct compatibility., Lars Brinkhoff, 2017/03/20
- [Emacs-diffs] scratch/record db8ff08 08/13: Better doc strings for `make-record', `record', and `copy-record'.,
Lars Brinkhoff <=
- [Emacs-diffs] scratch/record 5d4f89f 02/13: Update cl-defstruct to use records., Lars Brinkhoff, 2017/03/20