Skip to content

Instantly share code, notes, and snippets.

@llibra
Created August 10, 2011 11:51
Show Gist options
  • Save llibra/1136638 to your computer and use it in GitHub Desktop.
Save llibra/1136638 to your computer and use it in GitHub Desktop.
reader behavior
(values
(let ((*package* (find-package :keyword)))
(symbol-package (read-from-string "a")))
(let ((*package* (find-package :cl-user)))
(symbol-package (read-from-string "a"))))
;=> #<Package "KEYWORD">, #<Package "COMMON-LISP-USER">
(values
(let ((*package* (find-package :cl-user)))
(symbol-package (funcall (eval (read-from-string "#'(lambda () 'a)")))))
(let ((*package* (find-package :llibra)))
(symbol-package (funcall (eval (read-from-string "#'(lambda () 'a)"))))))
;=> #<Package "COMMON-LISP-USER">, #<Package "LLIBRA">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment