comparison lispref/streams.texi @ 12098:a6eb5f12b0f3

*** empty log message ***
author Karl Heuer <kwzh@gnu.org>
date Tue, 06 Jun 1995 19:21:15 +0000
parents 61202823bbb9
children 4263612ea038
comparison
equal deleted inserted replaced
12097:d8c035332be8 12098:a6eb5f12b0f3
50 @code{a} and @code{b} produces the text @samp{(a b)}, and reading that 50 @code{a} and @code{b} produces the text @samp{(a b)}, and reading that
51 text produces a list (but not the same list) with elements @code{a} 51 text produces a list (but not the same list) with elements @code{a}
52 and @code{b}. 52 and @code{b}.
53 53
54 However, these two operations are not precisely inverses. There are 54 However, these two operations are not precisely inverses. There are
55 two kinds of exceptions: 55 three kinds of exceptions:
56 56
57 @itemize @bullet 57 @itemize @bullet
58 @item 58 @item
59 Printing can produce text that cannot be read. For example, buffers, 59 Printing can produce text that cannot be read. For example, buffers,
60 windows, frames, subprocesses and markers print into text that starts 60 windows, frames, subprocesses and markers print into text that starts
64 @item 64 @item
65 One object can have multiple textual representations. For example, 65 One object can have multiple textual representations. For example,
66 @samp{1} and @samp{01} represent the same integer, and @samp{(a b)} and 66 @samp{1} and @samp{01} represent the same integer, and @samp{(a b)} and
67 @samp{(a .@: (b))} represent the same list. Reading will accept any of 67 @samp{(a .@: (b))} represent the same list. Reading will accept any of
68 the alternatives, but printing must choose one of them. 68 the alternatives, but printing must choose one of them.
69
70 @item
71 Comments can appear at certain points in the middle of an object's
72 read sequence without affecting the result of reading it.
69 @end itemize 73 @end itemize
70 74
71 @node Input Streams 75 @node Input Streams
72 @section Input Streams 76 @section Input Streams
73 @cindex stream (for reading) 77 @cindex stream (for reading)
158 whitespace preceding the significant text. 162 whitespace preceding the significant text.
159 163
160 In Emacs 18, reading a symbol discarded the delimiter terminating the 164 In Emacs 18, reading a symbol discarded the delimiter terminating the
161 symbol. Thus, point would end up at the beginning of @samp{contents} 165 symbol. Thus, point would end up at the beginning of @samp{contents}
162 rather than after @samp{the}. The Emacs 19 behavior is superior because 166 rather than after @samp{the}. The Emacs 19 behavior is superior because
163 it correctly handles input such as @samp{bar(foo)}, where the delimiter 167 it correctly handles input such as @samp{bar(foo)}, where the
164 that ends one object is needed as the beginning of another object. 168 open-parenthesis that ends one object is needed as the beginning of
169 another object.
165 170
166 Here is an example of reading from a stream that is a marker, 171 Here is an example of reading from a stream that is a marker,
167 initially positioned at the beginning of the buffer shown. The value 172 initially positioned at the beginning of the buffer shown. The value
168 read is the symbol @code{This}. 173 read is the symbol @code{This}.
169 174