1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00
guile/module
Andreas Rottmann 8fdd85f834 Allow user-defined meta-commands
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>
2010-11-20 23:55:19 +01:00
..
ice-9 Use `define-module*' in (ice-9 history). 2010-11-20 00:47:12 +01:00
language better errors for ecmascript parser too 2010-11-18 13:03:49 +01:00
oop Remove goops-version, which is no longer defined 2010-10-02 18:14:45 +01:00
rnrs Add exports for missing functions from `(rnrs base)'. 2010-11-17 00:59:45 -05:00
scripts Have "frisk" recognize #:use-module' and #:autoload'. 2010-10-27 23:31:49 +02:00
srfi Add implementation of SRFI 38 2010-11-03 00:19:54 +01:00
sxml ssax: add procs to define parsed entities 2010-10-14 12:37:31 +02:00
system Allow user-defined meta-commands 2010-11-20 23:55:19 +01:00
texinfo Fix typos. 2010-09-02 00:04:39 +02:00
web flesh out (web server)'s sanitize-response 2010-11-13 18:31:34 +01:00
Makefile.am remove (web toy-server) 2010-11-12 17:16:36 +01:00
rnrs.scm Add exports for missing functions from `(rnrs base)'. 2010-11-17 00:59:45 -05:00
statprof.scm remove a number of debug options 2010-09-24 20:57:01 +02:00
texinfo.scm Remove unused top-level variables. 2010-01-11 01:21:14 +01:00