From c0f7fd07c3303f6928a42fe0ed41aefc8cf7fb2e Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 31 Jul 2008 12:47:45 +0200 Subject: Add SET-DISPATCH-MACRO-CHARACTER. --- reader.lisp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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))) -- cgit v1.2.3