s-expressionists / Eclector

A portable Common Lisp reader that is highly customizable, can recover from errors and can return concrete syntax trees
https://s-expressionists.github.io/Eclector/
BSD 2-Clause "Simplified" License
108 stars 9 forks source link

Fully support custom mechanism for tracking the current package #49

Closed scymtym closed 5 years ago

scymtym commented 5 years ago

Some clients implement custom behavior for packages and symbols by defining methods on interpret-symbol-token, interpret-symbol, wrap-in-quote and friends. These clients can have their own notion of the current package (e.g. stored in the client object). There is (at least) one blind spot though: the sharpsign-plus-minus macro function, when reading feature expressions, changes the current package by binding cl:*package*. A generic function (call-with-current-package client thunk package-designator) should be called instead.