Skip to content
This repository was archived by the owner on Dec 29, 2018. It is now read-only.

Fixed example usage in README.markdown #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@ Usage
`defsyntax` defines a new syntax. `name` is a symbol and `options` is
a list of option.

If option formed `(:macro-character char fn &optional
If option formed `(:macro-char char fn &optional
non-terminating-p)`, the syntax engine will call `set-macro-character`
with the arguments when enabling the syntax.

If option formed `(:dispatch-macro-character disp-ch sub-ch fn)`, the
If option formed `(:dispatch-macro-char disp-ch sub-ch fn)`, the
syntax engine will call `set-dispatch-macro-character` with the
arguments when enabling the syntax.

Here is an example:

;; Define cl-interpol syntax
(defsyntax interpol-syntax
(:dispatch-macro-character #\# #\? #'cl-interpol::interpol-reader))
(:dispatch-macro-char #\# #\? #'cl-interpol::interpol-reader))

This code is equivalent to:

(defvar interpol-syntax
`((:dispatch-macro-character #\# #\? ,#'cl-interpol::interpol-reader)))
`((:dispatch-macro-char #\# #\? ,#'cl-interpol::interpol-reader)))

If you don't want to use `defsyntax` in some reasons, use this code
instead.
Expand Down