Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leverage cl:packages to implement keymaps? #19

Open
Ambrevar opened this issue Jun 6, 2022 · 0 comments
Open

Leverage cl:packages to implement keymaps? #19

Ambrevar opened this issue Jun 6, 2022 · 0 comments

Comments

@Ambrevar
Copy link
Member

Ambrevar commented Jun 6, 2022

It just occurred to me that much of the keymap library lookup mechanism is actually re-implementing how symbols are looked up in packages in Common Lisp.

From the HyperSpec:

11.1.1.2.2 Package Inheritance

Packages can be built up in layers. From one point of view, a package is a single collection of
mappings from strings into internal symbols and external symbols. However, some of these
mappings might be established within the package itself, while other mappings are inherited from
other packages via use-package. A symbol is said to be present in a package if the mapping is
in the package itself and is not inherited from somewhere else.

So if somehow we could have keymaps subclass cl:packages, we could greatly simplify the implementation.
But cl:package is a "system class" which is implemented as a structure in SBCL, so we don't really have much flexibility nor portability here.

Any idea how to address this?

@aadcg aadcg transferred this issue from atlas-engineer/nyxt Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant