Next: , Up: Symbols   [Contents][Index]


5.6.1 Symbol Syntax

The read syntax of a symbol is usually its name; however, if the name contains any meta-characters (whitespace or any from ‘()[]'";|\’) they will have to be entered specially. There are two ways to tell the reader that a meta-character is actually part of the symbol’s name:

  1. Precede the meta-character by a backslash character (‘\’), for example:
    xy\(z\)                 ;the symbol whose name is ‘xy(z)
  2. Enclose part of the name in vertical bars (two ‘|’ characters). All characters after the starting vertical line are copied as-is until the closing vertical line is encountered. For example:
    xy|(z)|                 ;the symbol ‘xy(z)

Here are some example read syntaxes.

setq                    ; ‘setq’
|setq|                  ; ‘setq’
\s\e\t\q                ; ‘setq’
1                       ; the number 1
\1                      ; the symbol1’
|!$%zf78&|              ; ‘!$%zf78&’
foo|(bar)|              ; ‘foo(bar)’
foo\(bar\)              ; ‘foo(bar)