aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-02-21 13:45:20 +0000
committerChong Yidong2009-02-21 13:45:20 +0000
commit2bd1f99acae2d8074b85fcf755c371a0a3927166 (patch)
treee6166d19230ca89cbf3c827e30bb93e7d34a2714
parentb87a185f6d1fdecfe4c10dd7b7500ba9db85316d (diff)
downloademacs-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.texi78
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
34whether an object is a member of that type. 34whether 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
38object itself. For example, if an object is a vector, nothing can treat 38the object itself. For example, if an object is a vector, nothing can
39it as a number; Lisp knows it is a vector, not a number. 39treat 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
42variable, and the type is known by the compiler but not represented in 42variable, 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
991characters, and another double-quote, @code{"like this"}. To include a 991of characters, and another double-quote, @code{"like this"}. To
992double-quote in a string, precede it with a backslash; thus, @code{"\""} 992include a double-quote in a string, precede it with a backslash; thus,
993is a string containing just a single double-quote character. Likewise, 993@code{"\""} is a string containing just a single double-quote
994you can include a backslash by preceding it with another backslash, like 994character. Likewise, you can include a backslash by preceding it with
995this: @code{"this \\ is a single embedded backslash"}. 995another backslash, like this: @code{"this \\ is a single embedded
996backslash"}.
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
1366purposes. Most buffers are also meant to be seen by the user, and 1368purposes. Most buffers are also meant to be seen by the user, and
1367therefore displayed, at some time, in a window (@pxref{Windows}). But a 1369therefore displayed, at some time, in a window (@pxref{Windows}). But
1368buffer need not be displayed in any window. 1370a buffer need not be displayed in any window. Each buffer has a
1371designated position called @dfn{point} (@pxref{Positions}); most
1372editing commands act on the contents of the current buffer in the
1373neighborhood of point. At any time, one buffer is the @dfn{current
1374buffer}.
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
1371used like strings in Emacs Lisp, and the available operations are 1377used like strings in Emacs Lisp, and the available operations are
1372different. For example, you can insert text efficiently into an 1378different. For example, you can insert text efficiently into an
1373existing buffer, altering the buffer's contents, whereas ``inserting'' 1379existing buffer, altering the buffer's contents, whereas ``inserting''
1374text into a string requires concatenating substrings, and the result is 1380text into a string requires concatenating substrings, and the result
1375an entirely new string object. 1381is 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 1384characters in the current buffer; a whole chapter in this manual is
1379buffer}. Most editing commands act on the contents of the current 1385devoted to describing these functions (@pxref{Text}).
1380buffer in the neighborhood of point. Many of the standard Emacs
1381functions manipulate or test the characters in the current buffer; a
1382whole 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,
1534sizes, and contents of the windows in all frames. It is actually 1536sizes, and contents of the windows in all frames. It is not a
1535a list whose @sc{car} is @code{frame-configuration} and whose 1537primitive 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
1537which appears as the @sc{car} of that element. 1539element describes one frame, which appears as the @sc{car} of that
1540element.
1538 1541
1539 @xref{Frame Configurations}, for a description of several functions 1542 @xref{Frame Configurations}, for a description of several functions
1540related to frame configurations. 1543related 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.
1623There are actually three separate font types---@dfn{font objects},
1624@dfn{font specs}, and @dfn{font entities}---each of which has slightly
1625different properties. None of them have a read syntax; their print
1626syntax looks like @samp{#<font-object>}, @samp{#<font-spec>}, and
1627@samp{#<font-entity>} respectively. @xref{Low-Level Font}, for a
1628description 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
1868This function returns a symbol naming the primitive type of 1885This 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