aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref/objects.texi
diff options
context:
space:
mode:
authorEli Zaretskii2024-11-21 17:47:22 +0200
committerEli Zaretskii2024-11-21 17:47:22 +0200
commitc50ce03afc1ee636d5678844fcf982b7ac0a7f8f (patch)
tree65d9cfcf32e6fd607014099618ee6411c0abd14d /doc/lispref/objects.texi
parentc818c5bbafde627ed277c599815c27f8cd40f891 (diff)
downloademacs-c50ce03afc1ee636d5678844fcf982b7ac0a7f8f.tar.gz
emacs-c50ce03afc1ee636d5678844fcf982b7ac0a7f8f.zip
; Fix recent additions to the manuals
* doc/lispref/objects.texi (Type Specifiers): * doc/lispref/functions.texi (Declare Form): * doc/emacs/help.texi (Name Help): Fix wording and markup. (Bug#73626)
Diffstat (limited to 'doc/lispref/objects.texi')
-rw-r--r--doc/lispref/objects.texi50
1 files changed, 27 insertions, 23 deletions
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index d847f438e0f..df9c2267cc4 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -1506,13 +1506,13 @@ An example of a type descriptor is any instance of
1506 1506
1507A type specifier is an expression that denotes a type. A type 1507A type specifier is an expression that denotes a type. A type
1508represents a set of possible values. Type specifiers can be classified 1508represents a set of possible values. Type specifiers can be classified
1509in primitives and compounds. 1509into primitive types and compound types.
1510 1510
1511Type specifiers are in use for several purposes including: documenting 1511Type specifiers are in use for several purposes, including: documenting
1512function interfaces through declaration (@pxref{Declare Form}), 1512function interfaces through declaration (@pxref{Declare Form}),
1513specifying structure slot values (@pxref{Structures,,, cl, Common Lisp 1513specifying structure slot values (@pxref{Structures,,, cl, Common Lisp
1514Extensions for GNU Emacs Lisp}), type-checking through @code{cl-the} 1514Extensions for GNU Emacs Lisp}), type-checking through @code{cl-the}
1515(@pxref{Declarations,,, cl, Common Lisp Extensions for GNU Emacs Lisp}) 1515(@pxref{Declarations,,, cl, Common Lisp Extensions for GNU Emacs Lisp}),
1516and others. 1516and others.
1517 1517
1518@table @asis 1518@table @asis
@@ -1521,7 +1521,7 @@ Primitive types specifiers are the basic types (i.e.@: not composed by other
1521type specifiers). 1521type specifiers).
1522 1522
1523Built-in primitive types (like @code{integer}, @code{float}, 1523Built-in primitive types (like @code{integer}, @code{float},
1524@code{string} etc) are listed in @ref{Type Hierarchy}. 1524@code{string} etc.@:) are listed in @ref{Type Hierarchy}.
1525 1525
1526@item Compound type specifiers 1526@item Compound type specifiers
1527Compound types serve the purpose of defining more complex or precise 1527Compound types serve the purpose of defining more complex or precise
@@ -1530,55 +1530,59 @@ type specifications by combining or modifying simpler types.
1530List of compound type specifiers: 1530List of compound type specifiers:
1531 1531
1532@table @code 1532@table @code
1533@item (or @var{type-1} .. @var{type-n}) 1533@item (or @var{type-1} @dots{} @var{type-n})
1534The @code{or} type specifier describes a type that satisfies at least 1534The @code{or} type specifier describes a type that satisfies at least
1535one of the given types. 1535one of the given types.
1536 1536
1537@item (and @var{type-1} .. @var{type-n}) 1537@item (and @var{type-1} @dots{} @var{type-n})
1538Similarly the @code{and} type specifier describes a type that satisfies 1538Similarly the @code{and} type specifier describes a type that satisfies
1539all the given types. 1539all of the given types.
1540 1540
1541@item (not @var{type}) 1541@item (not @var{type})
1542The @code{not} type specifier defines any type except the specified one. 1542The @code{not} type specifier defines any type except the specified one.
1543 1543
1544@item (member @var{value-1} .. @var{value-n}) 1544@item (member @var{value-1} @dots{} @var{value-n})
1545The @code{member} type specifier allows to specify a type that includes 1545The @code{member} type specifier allows to specify a type that includes
1546only the explicitly listed values. 1546only the explicitly listed values.
1547 1547
1548@item (function (@var{arg-1-type} ... @var{arg-n-type}) @var{return-type}) 1548@item (function (@var{arg-1-type} @dots{} @var{arg-n-type}) @var{return-type})
1549The @code{function} type specifier is used to describe the argument 1549The @code{function} type specifier is used to describe the argument
1550types and return type of a function. Argument types can be interleaved 1550types and the return type of a function. Argument types can be interleaved
1551with symbols @code{&optional} and @code{&rest} to match the function's 1551with symbols @code{&optional} and @code{&rest} to match the function's
1552arguments (@pxref{Argument List}). 1552arguments (@pxref{Argument List}).
1553 1553
1554The following is to represent a function with: a first parameter of type 1554The type specifier represent a function whose first parameter is of type
1555@code{symbol}, a second optional parameter of type @code{float} and 1555@code{symbol}, the second optional parameter is of type @code{float},
1556returning an @code{integer}: 1556and which returns an @code{integer}:
1557
1557@example 1558@example
1558(function (symbol &optional float) integer) 1559 (function (symbol &optional float) integer)
1559@end example 1560@end example
1560 1561
1561@item (integer @var{lower-bound} @var{upper-bound}) 1562@item (integer @var{lower-bound} @var{upper-bound})
1562 1563The @code{integer} type specifier can also be used as a compound type
1563@code{integer} can be used as well as a compound type specifier to 1564specifier to define a subset of integer values by specifying a range.
1564define a subset of integers by specifying a range. This allows to 1565This allows to precisely control which integers are valid for a given
1565precisely control which integers are valid for a given type. 1566type.
1566 1567
1567@var{lower-bound} is the minimum integer value in the range and 1568@var{lower-bound} is the minimum integer value in the range and
1568@var{upper-bound} the maximum. It is possible to use @code{*} to 1569@var{upper-bound} the maximum. You can use @code{*} instead of the
1569indicate no lower or uper limit. 1570lower or upper bound to indicate no limit.
1571
1572The following represents all integers from -10 to 10:
1570 1573
1571The following represents all integers from -10 to 10.
1572@example 1574@example
1573(integer -10 10) 1575(integer -10 10)
1574@end example 1576@end example
1575 1577
1576The following represents 10. 1578The following represents the single value of 10:
1579
1577@example 1580@example
1578(integer 10 10) 1581(integer 10 10)
1579@end example 1582@end example
1580 1583
1581The following represents all integers from negative infinity to 10. 1584The following represents all the integers from negative infinity to 10:
1585
1582@example 1586@example
1583(integer * 10) 1587(integer * 10)
1584@end example 1588@end example