Next: , Previous: , Up: Lisp Data Types   [Contents][Index]

2.2 Special Read Syntax

Emacs Lisp represents many special objects and constructs via special hash notations.

#<…>

Objects that have no read syntax are presented like this (see Printed Representation).

##

The printed representation of an interned symbol whose name is an empty string (see Symbol Type).

#'

This is a shortcut for function, see Anonymous Functions.

#:

The printed representation of an uninterned symbol whose name is foo is ‘#:foo’ (see Symbol Type).

#N

When printing circular structures, this construct is used to represent where the structure loops back onto itself, and ‘N’ is the starting list count:

(let ((a (list 1)))
  (setcdr a a))
=> (1 . #0)
#N=
#N#

#N=’ gives the name to an object, and ‘#N#’ represents that object, so when reading back the object, they will be the same object instead of copies (see Circular Objects).

#@N

Skip the next ‘N’ characters (see Comments).

#xN

N’ represented as a hexadecimal number (‘#x2a’).

#oN

N’ represented as an octal number (‘#o52’).

#bN

N’ represented as a binary number (‘#b101010’).

#(…)

String text properties (see Text Props and Strings).

#^

A char table (see Char-Table Type).

#s(hash-table …)

A hash table (see Hash Table Type).

?C

A character (see Basic Char Syntax).

#$

The current file name in byte-compiled files (see Docs and Compilation). This is not meant to be used in Emacs Lisp source files.

#@N

Skip the next ‘N’ characters (see Comments). This is used in byte-compiled files, and is not meant to be used in Emacs Lisp source files.

Next: , Previous: , Up: Lisp Data Types   [Contents][Index]