[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 193ece8 1/2: Add a lispref node to list special rea
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 193ece8 1/2: Add a lispref node to list special read syntax forms |
Date: |
Sat, 12 Oct 2019 14:57:49 -0400 (EDT) |
branch: master
commit 193ece8d32e6acb757c09d9a575603b830cf9afa
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
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).
---
doc/lispref/objects.texi | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 2e8e2ee..2becc6f 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.
@menu
* Printed Representation:: How Lisp objects are represented as text.
+* Special Read Syntax:: An overview of all the special sequences.
* Comments:: Comments and their formatting conventions.
* Programming Types:: Types found in all Lisp systems.
* Editing Types:: Types specific to Emacs.
@@ -106,6 +107,69 @@ Lisp object represented by the text that is read; the
object may or may
not be evaluated later. @xref{Input Functions}, for a description of
@code{read}, the basic function for reading objects.
+@node Special Read Syntax
+@section Special Read Syntax
+@cindex special read syntax
+
+ Emacs Lisp represents many special objects and constructs via
+special hash notations.
+
+@table @asis
+@item @samp{#<...>}
+Objects that have no read syntax are presented like this
+(@pxref{Printed Representation}).
+
+@item @samp{##}
+The printed representation of an interned symbol whose name is an
+empty string (@pxref{Symbol Type}).
+
+@item @samp{#:}
+The printed representation of an uninterned symbol whose name is
+@var{foo} is @samp{#:@var{foo}} (@pxref{Symbol Type}).
+
+@item @samp{#N}
+When printing circular structures, this construct is used to represent
+where the structure loops back onto itself, and @samp{N} is the
+starting list count:
+
+@lisp
+(let ((a (list 1)))
+ (setcdr a a))
+=> (1 . #0)
+@end lisp
+
+@item @samp{#N=}
+@itemx @samp{#N#}
+@samp{#N=} gives the name to an object, and @samp{#N#} represents that
+object, so when reading back the object, they will be the same object
+instead of copies (@pxref{Circular Objects}).
+
+@item @samp{#@@N}
+Skip the next @samp{N} characters (@pxref{Comments}).
+
+@item @samp{#xN}
+@samp{N} represented as a hexadecimal number (@samp{#x2a}).
+
+@item @samp{#oN}
+@samp{N} represented as an octal number (@samp{#o52}).
+
+@item @samp{#bN}
+@samp{N} represented as a binary number (@samp{#b101010}).
+
+@item @samp{#(...)}
+A string text properties (@pxref{Text Props and Strings}).
+
+@item @samp{#^}
+A char table (@pxref{Char-Table Type}).
+
+@item @samp{#s(hash-table ...)}
+A hash table (@pxref{Hash Table Type}).
+
+@item @samp{?C}
+A character (@pxref{Basic Char Syntax}).
+@end table
+
+
@node Comments
@section Comments
@cindex comments