diff options
| author | Eli Zaretskii | 2024-11-21 17:47:22 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2024-11-21 17:47:22 +0200 |
| commit | c50ce03afc1ee636d5678844fcf982b7ac0a7f8f (patch) | |
| tree | 65d9cfcf32e6fd607014099618ee6411c0abd14d /doc/lispref/objects.texi | |
| parent | c818c5bbafde627ed277c599815c27f8cd40f891 (diff) | |
| download | emacs-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.texi | 50 |
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 | ||
| 1507 | A type specifier is an expression that denotes a type. A type | 1507 | A type specifier is an expression that denotes a type. A type |
| 1508 | represents a set of possible values. Type specifiers can be classified | 1508 | represents a set of possible values. Type specifiers can be classified |
| 1509 | in primitives and compounds. | 1509 | into primitive types and compound types. |
| 1510 | 1510 | ||
| 1511 | Type specifiers are in use for several purposes including: documenting | 1511 | Type specifiers are in use for several purposes, including: documenting |
| 1512 | function interfaces through declaration (@pxref{Declare Form}), | 1512 | function interfaces through declaration (@pxref{Declare Form}), |
| 1513 | specifying structure slot values (@pxref{Structures,,, cl, Common Lisp | 1513 | specifying structure slot values (@pxref{Structures,,, cl, Common Lisp |
| 1514 | Extensions for GNU Emacs Lisp}), type-checking through @code{cl-the} | 1514 | Extensions 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}), |
| 1516 | and others. | 1516 | and 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 | |||
| 1521 | type specifiers). | 1521 | type specifiers). |
| 1522 | 1522 | ||
| 1523 | Built-in primitive types (like @code{integer}, @code{float}, | 1523 | Built-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 |
| 1527 | Compound types serve the purpose of defining more complex or precise | 1527 | Compound types serve the purpose of defining more complex or precise |
| @@ -1530,55 +1530,59 @@ type specifications by combining or modifying simpler types. | |||
| 1530 | List of compound type specifiers: | 1530 | List 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}) |
| 1534 | The @code{or} type specifier describes a type that satisfies at least | 1534 | The @code{or} type specifier describes a type that satisfies at least |
| 1535 | one of the given types. | 1535 | one 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}) |
| 1538 | Similarly the @code{and} type specifier describes a type that satisfies | 1538 | Similarly the @code{and} type specifier describes a type that satisfies |
| 1539 | all the given types. | 1539 | all of the given types. |
| 1540 | 1540 | ||
| 1541 | @item (not @var{type}) | 1541 | @item (not @var{type}) |
| 1542 | The @code{not} type specifier defines any type except the specified one. | 1542 | The @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}) |
| 1545 | The @code{member} type specifier allows to specify a type that includes | 1545 | The @code{member} type specifier allows to specify a type that includes |
| 1546 | only the explicitly listed values. | 1546 | only 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}) |
| 1549 | The @code{function} type specifier is used to describe the argument | 1549 | The @code{function} type specifier is used to describe the argument |
| 1550 | types and return type of a function. Argument types can be interleaved | 1550 | types and the return type of a function. Argument types can be interleaved |
| 1551 | with symbols @code{&optional} and @code{&rest} to match the function's | 1551 | with symbols @code{&optional} and @code{&rest} to match the function's |
| 1552 | arguments (@pxref{Argument List}). | 1552 | arguments (@pxref{Argument List}). |
| 1553 | 1553 | ||
| 1554 | The following is to represent a function with: a first parameter of type | 1554 | The 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}, |
| 1556 | returning an @code{integer}: | 1556 | and 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 | 1563 | The @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 | 1564 | specifier to define a subset of integer values by specifying a range. |
| 1564 | define a subset of integers by specifying a range. This allows to | 1565 | This allows to precisely control which integers are valid for a given |
| 1565 | precisely control which integers are valid for a given type. | 1566 | type. |
| 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 |
| 1569 | indicate no lower or uper limit. | 1570 | lower or upper bound to indicate no limit. |
| 1571 | |||
| 1572 | The following represents all integers from -10 to 10: | ||
| 1570 | 1573 | ||
| 1571 | The 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 | ||
| 1576 | The following represents 10. | 1578 | The 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 | ||
| 1581 | The following represents all integers from negative infinity to 10. | 1584 | The 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 |