diff --git a/cl-punch.asd b/cl-punch.asd index ba14fe2..cf52070 100644 --- a/cl-punch.asd +++ b/cl-punch.asd @@ -18,7 +18,7 @@ :version "0.1" :author "Windymelt" :license "MIT" - :depends-on () + :depends-on (:cl-syntax) :components ((:module "src" :components ((:file "cl-punch")))) diff --git a/src/cl-punch.lisp b/src/cl-punch.lisp index e1f9b7c..d66039b 100644 --- a/src/cl-punch.lisp +++ b/src/cl-punch.lisp @@ -28,10 +28,9 @@ (let ((result-inner-form (mapcar #'replace-underscore form))) `(lambda ,(nreverse arg-symbol-list) ,result-inner-form))))) -(defun %enable-punch-syntax () - (setf *readtable* (copy-readtable)) - (set-macro-character #\^ #'punch-reader)) +(cl-syntax:defsyntax punch-syntax + (:macro-char #\^ #'punch-reader)) (defmacro enable-punch-syntax () '(eval-when (:compile-toplevel :load-toplevel :execute) - (%enable-punch-syntax))) + (cl-syntax:use-syntax punch-syntax)))