Skip to content

Leverage cl:packages to implement keymaps? #19

@Ambrevar

Description

@Ambrevar

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions