emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/record 453b0ed: Update documentation for type sema


From: Lars Brinkhoff
Subject: [Emacs-diffs] scratch/record 453b0ed: Update documentation for type semantics of records.
Date: Wed, 5 Apr 2017 02:47:06 -0400 (EDT)

branch: scratch/record
commit 453b0ed298a6f754a8be72eebfcccf410c5e52ba
Author: Lars Brinkhoff <address@hidden>
Commit: Lars Brinkhoff <address@hidden>

    Update documentation for type semantics of records.
    
    * objects.texi (Type Predicates): improve description of what
    `type-of' returns for records.
    
    * records.texi (Records): document behaviour when type slot is a record.
---
 doc/lispref/objects.texi | 3 ++-
 doc/lispref/records.texi | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 90cafbe..ddd0442 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -2037,7 +2037,8 @@ This function returns a symbol naming the primitive type 
of
 @code{marker}, @code{mutex}, @code{overlay}, @code{process},
 @code{string}, @code{subr}, @code{symbol}, @code{thread},
 @code{vector}, @code{window}, or @code{window-configuration}.
-However, if @var{object} is a record, its first slot is returned.
+However, if @var{object} is a record, the type specified by its first
+slot is returned; @ref{Records}.
 
 @example
 (type-of 1)
diff --git a/doc/lispref/records.texi b/doc/lispref/records.texi
index a6c560c..af23859 100644
--- a/doc/lispref/records.texi
+++ b/doc/lispref/records.texi
@@ -19,6 +19,11 @@ implementation records can have at most 4096 slots, whereas 
vectors
 can be much larger.  Like arrays, records use zero-origin indexing:
 the first slot has index 0.
 
+  The type slot should be a symbol or a record.  If it's a record,
address@hidden assumes it's an EIEIO (@pxref{Top,,,eieio,EIEIO}) type
+descriptor and returns the contents of slot 1.  Any other kind of
+object is returned as-is.
+
   The printed representation of records is @samp{#s} followed by a
 list specifying the contents.  The first list element must be the
 record type.  The following elements are the record slots.



reply via email to

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