aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-10-12 20:56:52 +0200
committerLars Ingebrigtsen2019-10-12 20:57:43 +0200
commit193ece8d32e6acb757c09d9a575603b830cf9afa (patch)
treedd35b6b721c4e32ece5b0c634e9450097aeb1905
parent7d3404d34d02d867c98ff5e9250f5bcf518fd427 (diff)
downloademacs-193ece8d32e6acb757c09d9a575603b830cf9afa.tar.gz
emacs-193ece8d32e6acb757c09d9a575603b830cf9afa.zip
Add a lispref node to list special read syntax forms
* doc/lispref/objects.texi (Special Read Syntax): Add a node to list all the special read syntax forms (bug#18957).
-rw-r--r--doc/lispref/objects.texi64
1 files changed, 64 insertions, 0 deletions
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 2e8e2ee7147..2becc6f2ced 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -52,6 +52,7 @@ to use these types can be found in later chapters.
52 52
53@menu 53@menu
54* Printed Representation:: How Lisp objects are represented as text. 54* Printed Representation:: How Lisp objects are represented as text.
55* Special Read Syntax:: An overview of all the special sequences.
55* Comments:: Comments and their formatting conventions. 56* Comments:: Comments and their formatting conventions.
56* Programming Types:: Types found in all Lisp systems. 57* Programming Types:: Types found in all Lisp systems.
57* Editing Types:: Types specific to Emacs. 58* Editing Types:: Types specific to Emacs.
@@ -106,6 +107,69 @@ Lisp object represented by the text that is read; the object may or may
106not be evaluated later. @xref{Input Functions}, for a description of 107not be evaluated later. @xref{Input Functions}, for a description of
107@code{read}, the basic function for reading objects. 108@code{read}, the basic function for reading objects.
108 109
110@node Special Read Syntax
111@section Special Read Syntax
112@cindex special read syntax
113
114 Emacs Lisp represents many special objects and constructs via
115special hash notations.
116
117@table @asis
118@item @samp{#<...>}
119Objects that have no read syntax are presented like this
120(@pxref{Printed Representation}).
121
122@item @samp{##}
123The printed representation of an interned symbol whose name is an
124empty string (@pxref{Symbol Type}).
125
126@item @samp{#:}
127The printed representation of an uninterned symbol whose name is
128@var{foo} is @samp{#:@var{foo}} (@pxref{Symbol Type}).
129
130@item @samp{#N}
131When printing circular structures, this construct is used to represent
132where the structure loops back onto itself, and @samp{N} is the
133starting list count:
134
135@lisp
136(let ((a (list 1)))
137 (setcdr a a))
138=> (1 . #0)
139@end lisp
140
141@item @samp{#N=}
142@itemx @samp{#N#}
143@samp{#N=} gives the name to an object, and @samp{#N#} represents that
144object, so when reading back the object, they will be the same object
145instead of copies (@pxref{Circular Objects}).
146
147@item @samp{#@@N}
148Skip the next @samp{N} characters (@pxref{Comments}).
149
150@item @samp{#xN}
151@samp{N} represented as a hexadecimal number (@samp{#x2a}).
152
153@item @samp{#oN}
154@samp{N} represented as an octal number (@samp{#o52}).
155
156@item @samp{#bN}
157@samp{N} represented as a binary number (@samp{#b101010}).
158
159@item @samp{#(...)}
160A string text properties (@pxref{Text Props and Strings}).
161
162@item @samp{#^}
163A char table (@pxref{Char-Table Type}).
164
165@item @samp{#s(hash-table ...)}
166A hash table (@pxref{Hash Table Type}).
167
168@item @samp{?C}
169A character (@pxref{Basic Char Syntax}).
170@end table
171
172
109@node Comments 173@node Comments
110@section Comments 174@section Comments
111@cindex comments 175@cindex comments