]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak documentation for previous change
authorDaniel Colascione <dancol@dancol.org>
Sun, 20 Apr 2014 02:50:36 +0000 (19:50 -0700)
committerDaniel Colascione <dancol@dancol.org>
Sun, 20 Apr 2014 02:50:36 +0000 (19:50 -0700)
doc/misc/ChangeLog
doc/misc/cl.texi
etc/ChangeLog
etc/NEWS

index 4ad0293ee9bf62aad0a4122ea74189543378b74f..949552091e56cb2825db20eb4bd39887c3f5ec10 100644 (file)
@@ -1,3 +1,7 @@
+2014-04-20  Daniel Colascione  <dancol@dancol.org>
+
+       * cl.texi (Declarations): Document changes to `cl-the' and defstruct functions.
+
 2014-04-17  Paul Eggert  <eggert@cs.ucla.edu>
 
        * Makefile.in (infoclean): Be consistent about reporting failures.
index 1c202961889df1baebfe4b14c2e94f9621c3451f..78bc8fb9479e82d5d927d2ebd82d6ae412330fc5 100644 (file)
@@ -2627,10 +2627,10 @@ In this package, @code{cl-locally} is no different from @code{progn}.
 @end defmac
 
 @defmac cl-the type form
-Type information provided by @code{cl-the} is ignored in this package;
-in other words, @code{(cl-the @var{type} @var{form})} is equivalent to
-@var{form}.  Future byte-compiler optimizations may make use of this
-information.
+@code{cl-the} returns the value of @code{form}, first checking (if
+optimization settings permit) that it is of type @code{type}.  Future
+byte-compiler optimizations may also make use of this information to
+improve runtime efficiency.
 
 For example, @code{mapcar} can map over both lists and arrays.  It is
 hard for the compiler to expand @code{mapcar} into an in-line loop
@@ -4255,6 +4255,7 @@ This function returns the underlying data structure for
 @code{struct-type}, which is a symbol.  It returns @code{vector} or
 @code{list}, or @code{nil} if @code{struct-type} is not actually a
 structure.
+@end defun
 
 @defun cl-struct-slot-info struct-type
 This function returns a list of slot descriptors for structure
@@ -4263,6 +4264,7 @@ where @code{name} is the name of the slot and @code{opts} is the list
 of slot options given to @code{defstruct}.  Dummy entries represent
 the slots used for the struct name and that are skipped to implement
 @code{:initial-offset}.
+@end defun
 
 @defun cl-struct-slot-offset struct-type slot-name
 Return the offset of slot @code{slot-name} in @code{struct-type}.  The
@@ -4270,6 +4272,7 @@ returned zero-based slot index is relative to the start of the
 structure data type and is adjusted for any structure name and
 :initial-offset slots.  Signal error if struct @code{struct-type} does
 not contain @code{slot-name}.
+@end defun
 
 @defun cl-struct-slot-value struct-type slot-name inst
 Return the value of slot @code{slot-name} in @code{inst} of
@@ -4278,6 +4281,7 @@ Return the value of slot @code{slot-name} in @code{inst} of
 @code{setf} place.  @code{cl-struct-slot-value} uses
 @code{cl-struct-slot-offset} internally and can signal the same
 errors.
+@end defun
 
 @defun cl-struct-set-slot-value struct-type slot-name inst value
 Set the value of slot @code{slot-name} in @code{inst} of
@@ -4286,6 +4290,7 @@ Set the value of slot @code{slot-name} in @code{inst} of
 which to set the given slot.  Return @code{value}.
 @code{cl-struct-slot-value} uses @code{cl-struct-set-slot-offset}
 internally and can signal the same errors.
+@end defun
 
 @node Assertions
 @chapter Assertions and Errors
index de57d81a6854fea248bf90959139f7855755afc5..77294aae776ac433227f47d4f72d777515a3f91a 100644 (file)
@@ -1,6 +1,6 @@
 2014-04-20  Daniel Colascione  <dancol@dancol.org>
 
-       * NEWS: Mention new struct functions.
+       * NEWS: Mention new struct functions and changes to `cl-the'.
 
 2014-04-17  Daniel Colascione  <dancol@dancol.org>
 
index c3b2e502f01c99e5d666fc12c1618a25fac24f7f..06fe4a298fa45c4e7b9c72fbcec343d4dfaf258c 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -90,6 +90,8 @@ active region handling.
 
 ** deactivate-mark is now buffer-local.
 
+** cl-the now asserts that its argument is of the given type.
+
 \f
 * Lisp Changes in Emacs 24.5