diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-07-31 12:47:45 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-07-31 12:47:45 +0200 |
commit | c0f7fd07c3303f6928a42fe0ed41aefc8cf7fb2e (patch) | |
tree | 7ab16bb5f84326da6ffeeb19bd49c1e4860aff90 | |
parent | bb2607cdac6214d76fe85442e58f1ea6bcc914ae (diff) |
Add SET-DISPATCH-MACRO-CHARACTER.
-rw-r--r-- | reader.lisp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/reader.lisp b/reader.lisp index 22f962d..f3c28e2 100644 --- a/reader.lisp +++ b/reader.lisp @@ -38,7 +38,8 @@ recursive-p t)) ;FIXME: this neither -(defun read-from-string (string &optional eof-error-p eof-value &key start end preserve-whitespace) +(defun read-from-string (string &optional eof-error-p eof-value + &key start end preserve-whitespace) (let ((stream (send-by-name (find-objc-class "MLKStringInputStream") "streamWithString:" string))) @@ -49,3 +50,9 @@ eof-value nil preserve-whitespace))) + +(defun set-dispatch-macro-character (char subchar function &optional readtable) + (unless readtable + (setq readtable *readtable*)) + (let ((dispatcher (send-by-name readtable "macroFunctionForCharacter:" char))) + (send-by-name dispatcher "setMacroFunction:forCharacter:" function subchar))) |