If words of command are not clear and distinct, if orders are not thoroughly understood, then the general is to blame.
The command module is responsible for a couple things. In Emacs one defines commands by using the special form [[(interactive)]] within the body of the procedure. Consider this simple command.
(defun hello-command () (interactive) (message "Hello, Emacs!"))
Emacsy uses a more Scheme-like means of defining commands as shown below.
(define-interactive (hello-command) (message "Hello, Emacsy!"))
One deviation from Emacs I want to see within Emacsy is to have the commands be more context sensitive. To illustrate the problem when I hit M-x TAB TAB it autocompletes all the available commands into a buffer. In my case that buffer contains 4,840 commands. This doesn’t seem to hurt command usability, but it does hurt the command discoverability.
I want Emacsy to have command sets that are analogous to keymaps. There will be a global command set [[global-cmdset]] similar to the global keymap [[global-map]]. And in the same way that major and minor modes may add keymaps to a particular buffer, so too may they add command maps.
The class holds the entries, a string completer for tab completion, and potentially a parent command map.
We have accessors for adding, removing, and testing what’s in the set. Note that the parent set is never mutated.