[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] Why does `defcommand' export the command symbol?
From: |
Diogo F. S. Ramos |
Subject: |
Re: [STUMP] Why does `defcommand' export the command symbol? |
Date: |
Fri, 07 Nov 2014 21:45:22 -0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
>> By using `defcommand' in a module (separate package), I couldn't
>> redefine the package because the symbols defining the commands were
>> exported but they were not listed in my new package redefinition.
>
> If you call (stumpwm:defcommand foo ...) from an external package, you
> export foo from your package (ie module:foo), but you never defined
> module:foo for your package, so your encountering an error?
The error occurs when I try to redefine a package using `defpackage'.
It is not something one has to do, but it can happen during interactive
development.
Suppose I have a module like:
(defpackage #:my-module
(:use #:cl))
(in-package #:my-module)
(stumpwm:defcommand my-command () ()
"This is my command."
(values))
Now I change my mind about the `defpackage' form and I want to compile a
new one to import the symbol `defcommand' from the package `stumpwm'.
(defpackage #:my-module
(:use #:cl)
(:import-from #:stumpwm #:defcommand))
SBCL won't let me because `defcommand' exported the symbol `my-command'
and my redefinition does not list it as an exported symbol.
- [STUMP] Why does `defcommand' export the command symbol?, Diogo F. S. Ramos, 2014/11/07
- Re: [STUMP] Why does `defcommand' export the command symbol?, David Bjergaard, 2014/11/07
- Re: [STUMP] Why does `defcommand' export the command symbol?, Diogo F. S. Ramos, 2014/11/07
- Re: [STUMP] Why does `defcommand' export the command symbol?, David Bjergaard, 2014/11/07
- Re: [STUMP] Why does `defcommand' export the command symbol?,
Diogo F. S. Ramos <=
- Re: [STUMP] Why does `defcommand' export the command symbol?, Diogo F. S. Ramos, 2014/11/07
- Re: [STUMP] Why does `defcommand' export the command symbol?, Michael Raskin, 2014/11/08
- Re: [STUMP] Why does `defcommand' export the command symbol?, Diogo F. S. Ramos, 2014/11/08
- Re: [STUMP] Why does `defcommand' export the command symbol?, David Bjergaard, 2014/11/08
- Re: [STUMP] Why does `defcommand' export the command symbol?, Diogo F. S. Ramos, 2014/11/11
- Re: [STUMP] Why does `defcommand' export the command symbol?, Michael Raskin, 2014/11/08