mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
Besides allowing user-defined meta-commands, this change also refactors the meta-command machinery to split reading a command's arguments from the procedure actually implementing it, and hence allows nesting meta-commands. As an example of such a command, ",in" is added as a new meta-command. * module/system/repl/command.scm: Export `define-meta-command'. (*command-module*): Replaced by the hash table `*command-infos*'. (command-info, make-command-info, command-info-procedure) (command-info-arguments-reader): New procedures, encapsulating the information about a meta-command. (command-procedure): Adapted to use the `command-info' lookup procedure. (read-command-arguments): New auxiliary procedure invoking a command's argument reader procedure. (meta-command): Adapted to the split of reading arguments and executing a command. (add-meta-command!): New auxiliary procedure, registers a meta command's procedure and argument reader into `*command-infos* and `*command-table*. (define-meta-command): Extended to allow specification of the command's category; split the argument reader and actual command procedure. (guile:apropos, guile:load, guile:compile-file, guile:gc): Remove these aliases, they are unnecessary as we now use a hash table instead of the module to store the commands. (in): New meta-command, which evaluates an expression, or alternatively executes another meta-command, in the context of a specific module. * doc/ref/scheme-using.texi (Module Commands): Document the `in' meta-command. Signed-off-by: Ludovic Courtès <ludo@gnu.org> |
||
---|---|---|
.. | ||
command.scm | ||
common.scm | ||
debug.scm | ||
describe.scm | ||
error-handling.scm | ||
repl.scm | ||
server.scm |