diff options
| author | Chong Yidong | 2009-02-21 13:45:20 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-02-21 13:45:20 +0000 |
| commit | 2bd1f99acae2d8074b85fcf755c371a0a3927166 (patch) | |
| tree | e6166d19230ca89cbf3c827e30bb93e7d34a2714 | |
| parent | b87a185f6d1fdecfe4c10dd7b7500ba9db85316d (diff) | |
| download | emacs-2bd1f99acae2d8074b85fcf755c371a0a3927166.tar.gz emacs-2bd1f99acae2d8074b85fcf755c371a0a3927166.zip | |
(Lisp Data Types, Syntax for Strings, Buffer Type): Minor edits.
(Frame Configuration Type): Emphasize that it is not primitive.
(Font Type): New node.
(Type Predicates): Add fontp; type-of now recognizes font object types.
| -rw-r--r-- | doc/lispref/objects.texi | 78 |
1 files changed, 48 insertions, 30 deletions
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index dd200328453..9291ca1160b 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi | |||
| @@ -33,10 +33,10 @@ include @dfn{integer}, @dfn{float}, @dfn{cons}, @dfn{symbol}, | |||
| 33 | Each primitive type has a corresponding Lisp function that checks | 33 | Each primitive type has a corresponding Lisp function that checks |
| 34 | whether an object is a member of that type. | 34 | whether an object is a member of that type. |
| 35 | 35 | ||
| 36 | Note that Lisp is unlike many other languages in that Lisp objects are | 36 | Lisp is unlike many other languages in that its objects are |
| 37 | @dfn{self-typing}: the primitive type of the object is implicit in the | 37 | @dfn{self-typing}: the primitive type of each object is implicit in |
| 38 | object itself. For example, if an object is a vector, nothing can treat | 38 | the object itself. For example, if an object is a vector, nothing can |
| 39 | it as a number; Lisp knows it is a vector, not a number. | 39 | treat it as a number; Lisp knows it is a vector, not a number. |
| 40 | 40 | ||
| 41 | In most languages, the programmer must declare the data type of each | 41 | In most languages, the programmer must declare the data type of each |
| 42 | variable, and the type is known by the compiler but not represented in | 42 | variable, and the type is known by the compiler but not represented in |
| @@ -987,12 +987,13 @@ of a string returns the same string. | |||
| 987 | @cindex double-quote in strings | 987 | @cindex double-quote in strings |
| 988 | @cindex @samp{\} in strings | 988 | @cindex @samp{\} in strings |
| 989 | @cindex backslash in strings | 989 | @cindex backslash in strings |
| 990 | The read syntax for strings is a double-quote, an arbitrary number of | 990 | The read syntax for a string is a double-quote, an arbitrary number |
| 991 | characters, and another double-quote, @code{"like this"}. To include a | 991 | of characters, and another double-quote, @code{"like this"}. To |
| 992 | double-quote in a string, precede it with a backslash; thus, @code{"\""} | 992 | include a double-quote in a string, precede it with a backslash; thus, |
| 993 | is a string containing just a single double-quote character. Likewise, | 993 | @code{"\""} is a string containing just a single double-quote |
| 994 | you can include a backslash by preceding it with another backslash, like | 994 | character. Likewise, you can include a backslash by preceding it with |
| 995 | this: @code{"this \\ is a single embedded backslash"}. | 995 | another backslash, like this: @code{"this \\ is a single embedded |
| 996 | backslash"}. | ||
| 996 | 997 | ||
| 997 | @cindex newline in strings | 998 | @cindex newline in strings |
| 998 | The newline character is not special in the read syntax for strings; | 999 | The newline character is not special in the read syntax for strings; |
| @@ -1355,6 +1356,7 @@ editing. | |||
| 1355 | * Stream Type:: Receive or send characters. | 1356 | * Stream Type:: Receive or send characters. |
| 1356 | * Keymap Type:: What function a keystroke invokes. | 1357 | * Keymap Type:: What function a keystroke invokes. |
| 1357 | * Overlay Type:: How an overlay is represented. | 1358 | * Overlay Type:: How an overlay is represented. |
| 1359 | * Font Type:: Fonts for displaying text. | ||
| 1358 | @end menu | 1360 | @end menu |
| 1359 | 1361 | ||
| 1360 | @node Buffer Type | 1362 | @node Buffer Type |
| @@ -1364,23 +1366,23 @@ editing. | |||
| 1364 | (@pxref{Buffers}). Most buffers hold the contents of a disk file | 1366 | (@pxref{Buffers}). Most buffers hold the contents of a disk file |
| 1365 | (@pxref{Files}) so they can be edited, but some are used for other | 1367 | (@pxref{Files}) so they can be edited, but some are used for other |
| 1366 | purposes. Most buffers are also meant to be seen by the user, and | 1368 | purposes. Most buffers are also meant to be seen by the user, and |
| 1367 | therefore displayed, at some time, in a window (@pxref{Windows}). But a | 1369 | therefore displayed, at some time, in a window (@pxref{Windows}). But |
| 1368 | buffer need not be displayed in any window. | 1370 | a buffer need not be displayed in any window. Each buffer has a |
| 1371 | designated position called @dfn{point} (@pxref{Positions}); most | ||
| 1372 | editing commands act on the contents of the current buffer in the | ||
| 1373 | neighborhood of point. At any time, one buffer is the @dfn{current | ||
| 1374 | buffer}. | ||
| 1369 | 1375 | ||
| 1370 | The contents of a buffer are much like a string, but buffers are not | 1376 | The contents of a buffer are much like a string, but buffers are not |
| 1371 | used like strings in Emacs Lisp, and the available operations are | 1377 | used like strings in Emacs Lisp, and the available operations are |
| 1372 | different. For example, you can insert text efficiently into an | 1378 | different. For example, you can insert text efficiently into an |
| 1373 | existing buffer, altering the buffer's contents, whereas ``inserting'' | 1379 | existing buffer, altering the buffer's contents, whereas ``inserting'' |
| 1374 | text into a string requires concatenating substrings, and the result is | 1380 | text into a string requires concatenating substrings, and the result |
| 1375 | an entirely new string object. | 1381 | is an entirely new string object. |
| 1376 | 1382 | ||
| 1377 | Each buffer has a designated position called @dfn{point} | 1383 | Many of the standard Emacs functions manipulate or test the |
| 1378 | (@pxref{Positions}). At any time, one buffer is the @dfn{current | 1384 | characters in the current buffer; a whole chapter in this manual is |
| 1379 | buffer}. Most editing commands act on the contents of the current | 1385 | devoted to describing these functions (@pxref{Text}). |
| 1380 | buffer in the neighborhood of point. Many of the standard Emacs | ||
| 1381 | functions manipulate or test the characters in the current buffer; a | ||
| 1382 | whole chapter in this manual is devoted to describing these functions | ||
| 1383 | (@pxref{Text}). | ||
| 1384 | 1386 | ||
| 1385 | Several other data structures are associated with each buffer: | 1387 | Several other data structures are associated with each buffer: |
| 1386 | 1388 | ||
| @@ -1531,10 +1533,11 @@ window configurations. | |||
| 1531 | @cindex window layout, all frames | 1533 | @cindex window layout, all frames |
| 1532 | 1534 | ||
| 1533 | A @dfn{frame configuration} stores information about the positions, | 1535 | A @dfn{frame configuration} stores information about the positions, |
| 1534 | sizes, and contents of the windows in all frames. It is actually | 1536 | sizes, and contents of the windows in all frames. It is not a |
| 1535 | a list whose @sc{car} is @code{frame-configuration} and whose | 1537 | primitive type---it is actually a list whose @sc{car} is |
| 1536 | @sc{cdr} is an alist. Each alist element describes one frame, | 1538 | @code{frame-configuration} and whose @sc{cdr} is an alist. Each alist |
| 1537 | which appears as the @sc{car} of that element. | 1539 | element describes one frame, which appears as the @sc{car} of that |
| 1540 | element. | ||
| 1538 | 1541 | ||
| 1539 | @xref{Frame Configurations}, for a description of several functions | 1542 | @xref{Frame Configurations}, for a description of several functions |
| 1540 | related to frame configurations. | 1543 | related to frame configurations. |
| @@ -1613,6 +1616,17 @@ positions. | |||
| 1613 | 1616 | ||
| 1614 | @xref{Overlays}, for how to create and use overlays. | 1617 | @xref{Overlays}, for how to create and use overlays. |
| 1615 | 1618 | ||
| 1619 | @node Font Type | ||
| 1620 | @subsection Font Type | ||
| 1621 | |||
| 1622 | A @dfn{font} specifies how to display text on a graphical terminal. | ||
| 1623 | There are actually three separate font types---@dfn{font objects}, | ||
| 1624 | @dfn{font specs}, and @dfn{font entities}---each of which has slightly | ||
| 1625 | different properties. None of them have a read syntax; their print | ||
| 1626 | syntax looks like @samp{#<font-object>}, @samp{#<font-spec>}, and | ||
| 1627 | @samp{#<font-entity>} respectively. @xref{Low-Level Font}, for a | ||
| 1628 | description of these Lisp objects. | ||
| 1629 | |||
| 1616 | @node Circular Objects | 1630 | @node Circular Objects |
| 1617 | @section Read Syntax for Circular Objects | 1631 | @section Read Syntax for Circular Objects |
| 1618 | @cindex circular structure, read syntax | 1632 | @cindex circular structure, read syntax |
| @@ -1769,6 +1783,9 @@ with references to further information. | |||
| 1769 | @item floatp | 1783 | @item floatp |
| 1770 | @xref{Predicates on Numbers, floatp}. | 1784 | @xref{Predicates on Numbers, floatp}. |
| 1771 | 1785 | ||
| 1786 | @item fontp | ||
| 1787 | @xref{Low-Level Font}. | ||
| 1788 | |||
| 1772 | @item frame-configuration-p | 1789 | @item frame-configuration-p |
| 1773 | @xref{Frame Configurations, frame-configuration-p}. | 1790 | @xref{Frame Configurations, frame-configuration-p}. |
| 1774 | 1791 | ||
| @@ -1866,11 +1883,12 @@ types. In most cases, it is more convenient to use type predicates than | |||
| 1866 | 1883 | ||
| 1867 | @defun type-of object | 1884 | @defun type-of object |
| 1868 | This function returns a symbol naming the primitive type of | 1885 | This function returns a symbol naming the primitive type of |
| 1869 | @var{object}. The value is one of the symbols @code{symbol}, | 1886 | @var{object}. The value is one of the symbols @code{bool-vector}, |
| 1870 | @code{integer}, @code{float}, @code{string}, @code{cons}, @code{vector}, | 1887 | @code{buffer}, @code{char-table}, @code{compiled-function}, |
| 1871 | @code{char-table}, @code{bool-vector}, @code{hash-table}, @code{subr}, | 1888 | @code{cons}, @code{float}, @code{font-entity}, @code{font-object}, |
| 1872 | @code{compiled-function}, @code{marker}, @code{overlay}, @code{window}, | 1889 | @code{font-spec}, @code{frame}, @code{hash-table}, @code{integer}, |
| 1873 | @code{buffer}, @code{frame}, @code{process}, or | 1890 | @code{marker}, @code{overlay}, @code{process}, @code{string}, |
| 1891 | @code{subr}, @code{symbol}, @code{vector}, @code{window}, or | ||
| 1874 | @code{window-configuration}. | 1892 | @code{window-configuration}. |
| 1875 | 1893 | ||
| 1876 | @example | 1894 | @example |