Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Lisp forget about previously exported symbols?

This is how I export symbols :bar and :baz from package foo:

(in-package :cl-user)
(defpackage foo
   (:use :cl)
   (:export :bar :baz))
(in-package :foo)

When I remove :baz from the list of exported symbols SBCL complains and the compilation fails.

 warning: 
     FOO also exports the following symbols:
       (FOO:BAZ)

How can I make SBCL make forget about :baz without reloading SLIME?

like image 909
Jan Deinhard Avatar asked Jul 05 '12 19:07

Jan Deinhard


1 Answers

SBCL:

* (apropos "unexport")

UNEXPORT (fbound)


* (documentation 'unexport 'function)

"Makes SYMBOLS no longer exported from PACKAGE."


* (apropos "unintern")

UNINTERN (fbound)


* (documentation 'unintern 'function)

"Makes SYMBOL no longer present in PACKAGE. If SYMBOL was present then T is
returned, otherwise NIL. If PACKAGE is SYMBOL's home package, then it is made
uninterned."
like image 165
Rainer Joswig Avatar answered Sep 21 '22 12:09

Rainer Joswig