Skip to content

Instantly share code, notes, and snippets.

@eshamster
Last active September 17, 2015 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eshamster/cf4ae0173181865deca5 to your computer and use it in GitHub Desktop.
Save eshamster/cf4ae0173181865deca5 to your computer and use it in GitHub Desktop.
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros +Q -- $0 "$@"
|#
(defun set-delimiter-with-print (char)
(set-macro-character char #'(lambda (&rest rest)
(declare (ignore rest))))
(print "set delimiter"))
(eval-when (:execute)
(set-macro-character #\+ #'(lambda (&rest rest)
(declare (ignore rest))
(print "test"))))
(defun main (&rest argv)
(declare (ignorable argv))
(let ((*readtable* (copy-readtable *readtable*)))
(set-delimiter-with-print #\-)
(print '(1+2-3))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment