cl-package-aliases
Extends the standard CL package system with the ability to define package-local aliases (nicknames) to other packages in a transparent way. It tries to integrate with the rest of CL, so functions like RENAME-PACKAGE are aware of these aliases. It is written by Oliver Markovic.

Since this needs additional support beyond ANSI to work properly, cl-package-aliases isn't really a portable library. The current version works on Allegro CL 6.2, CMUCL, LispWorks 4.3, OpenMCL 0.14 and SBCL 0.8.5.

Using cl-package-aliases

After loading the library, you can either add aliases by hand or use the new :ALIAS option in DEFPACKAGE.

* (defpackage :foo (:use :cl) (:alias (:common-lisp :bar)))

# <PACKAGE "FOO">
* (in-package :foo)

# <PACKAGE "FOO">
* (bar:format t "Hello World~%")
Hello World
NIL

License

BSD without advertising clause.

Download

https://common-lisp.net/~dlichteblau/inofficial/cl-package-aliases.tar.bz2

TODO

  • think about how to avoid the patching. This could be done with a reader hook and function wrappers (encapsulation?)


Topics: language extension