emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/record 7fb4bb1: Document `type descriptors'.


From: Lars Brinkhoff
Subject: [Emacs-diffs] scratch/record 7fb4bb1: Document `type descriptors'.
Date: Thu, 6 Apr 2017 03:29:42 -0400 (EDT)

branch: scratch/record
commit 7fb4bb1027c7f2c8f8c754a0bb4b66a6e04eca7c
Author: Lars Brinkhoff <address@hidden>
Commit: Lars Brinkhoff <address@hidden>

    Document `type descriptors'.
    
    * objects.texi (Type Descriptors): new section.
    * elisp.texi: reference it.
    * records.texi (Records): reference it.
---
 doc/lispref/elisp.texi   |  1 +
 doc/lispref/objects.texi | 13 +++++++++++++
 doc/lispref/records.texi |  4 ++--
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 3a348aa..bff3112 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -316,6 +316,7 @@ Programming Types
 * Primitive Function Type::     A function written in C, callable from Lisp.
 * Byte-Code Type::      A function written in Lisp, then compiled.
 * Record Type::         Compound objects with programmer-defined types.
+* Type Descriptors::    Objects holding information about types.
 * Autoload Type::       A type used for automatically loading seldom-used
                           functions.
 * Finalizer Type::      Runs code when no longer reachable.
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index ddd0442..cc93209 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -156,6 +156,7 @@ latter are unique to Emacs Lisp.
 * Primitive Function Type::     A function written in C, callable from Lisp.
 * Byte-Code Type::      A function written in Lisp, then compiled.
 * Record Type::         Compound objects with programmer-defined types.
+* Type Descriptors::    Objects holding information about types.
 * Autoload Type::       A type used for automatically loading seldom-used
                         functions.
 * Finalizer Type::      Runs code when no longer reachable.
@@ -1359,6 +1360,18 @@ types that are not built into Emacs.
 
   @xref{Records}, for functions that work with records.
 
address@hidden Type Descriptors
address@hidden Type Descriptors
+
+  A @dfn{type decriptor} is a @code{record} which holds information
+about a type.  Slot 1 in the record must be a symbol naming the type.
address@hidden relies on this to return the type of @code{record}
+objects.  No other type descriptor slot is used by Emacs; they are
+free for use by Lisp extensions.
+
+An example of a type descriptor is any instance of
address@hidden
+
 @node Autoload Type
 @subsection Autoload Type
 
diff --git a/doc/lispref/records.texi b/doc/lispref/records.texi
index 3bf6a4a..a924baf 100644
--- a/doc/lispref/records.texi
+++ b/doc/lispref/records.texi
@@ -20,8 +20,8 @@ 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 type descriptor.  If it's a
-type descriptor, the symbol naming its type will be returned.  Any
-other kind of object is returned as-is.
+type descriptor, the symbol naming its type will be returned;
address@hidden Descriptors}.  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



reply via email to

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