aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/cl.texi26
1 files changed, 18 insertions, 8 deletions
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index a9197602634..afe8f01f596 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -24,7 +24,7 @@ modify this GNU manual.''
24 24
25@dircategory Emacs lisp libraries 25@dircategory Emacs lisp libraries
26@direntry 26@direntry
27* CL: (cl). Partial Common Lisp support for Emacs Lisp. 27* CL-Lib: (cl). Partial Common Lisp support for Emacs Lisp.
28@end direntry 28@end direntry
29 29
30@finalout 30@finalout
@@ -4036,12 +4036,6 @@ is either a slot symbol or a list of the form @samp{(@var{slot-name}
4036is a Lisp form that is evaluated any time an instance of the 4036is a Lisp form that is evaluated any time an instance of the
4037structure type is created without specifying that slot's value. 4037structure type is created without specifying that slot's value.
4038 4038
4039Common Lisp defines several slot options, but the only one
4040implemented in this package is @code{:read-only}. A non-@code{nil}
4041value for this option means the slot should not be @code{setf}-able;
4042the slot's value is determined when the object is created and does
4043not change afterward.
4044
4045@example 4039@example
4046(cl-defstruct person 4040(cl-defstruct person
4047 (name nil :read-only t) 4041 (name nil :read-only t)
@@ -4049,7 +4043,23 @@ not change afterward.
4049 (sex 'unknown)) 4043 (sex 'unknown))
4050@end example 4044@end example
4051 4045
4052Any slot options other than @code{:read-only} are ignored. 4046@var{slot-options} is a list of keyword-value pairs, where the
4047following keywords can be used:
4048
4049@table @code
4050@item :read-only
4051A non-nil value means the slot should not be @code{setf}-able;
4052the slot's value is determined when the object is created and does
4053not change afterward.
4054
4055@item :type
4056The expected type of the values held in this slot.
4057
4058@item :documentation
4059A documentation string describing the slot.
4060@end table
4061
4062Other slot options are currently ignored.
4053 4063
4054For obscure historical reasons, structure options take a different 4064For obscure historical reasons, structure options take a different
4055form than slot options. A structure option is either a keyword 4065form than slot options. A structure option is either a keyword