stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [STUMP] Why does `defcommand' export the command symbol?


From: David Bjergaard
Subject: Re: [STUMP] Why does `defcommand' export the command symbol?
Date: Fri, 07 Nov 2014 17:44:27 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Hi Diogo,

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*.

    Dave

"Diogo F. S. Ramos" <address@hidden> writes:

> The `defcommand' macro has a (export ',name) form to export the symbol
> `name', which gives the defining command its name.
>
> Why does it do it?
>
> _______________________________________________
> Stumpwm-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/stumpwm-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]