[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:10:26 -0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
> I think its there because a defcommand exposes commands to the user, and
> so it makes sense that their exported from the package. This is more a
> policy than a requirement. (if the user can call the command, then other
> parts of StumpWM itself should be able to call the command too.)
>
> I'm pretty sure the name is actually stored in the *command-hash* and
> the call to make-command. Maybe someone with more knowledge can
> comment.
>
> Notice that the deprecated `DEFINE-STUMPWM-COMMAND' doesn't export
> anything. It just defun's the name and stores the name (with metadata)
> in the *command-hash*.
I see.
I am asking because such policy cause me a problem.
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.
Even if StumpWM should be able to call commands like the user, it won't
happen as things are, because exported symbols need to be prefixed by
the package exporting it.
I wonder if we are better of by not exporting `defcommand' symbols.
- [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?, 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?, 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