-(defmacro-public in-module-define-variable (module-name symbol value)
- "Define a variable in a module and export its name.
- (in-module-define-variable (some module) symbol value)"
- (let ((gmodule (gensym "module")))
- `(let ((,gmodule (resolve-module ',module-name)))
- (module-define! ,gmodule ',symbol ,value)
- (module-export! ,gmodule '(,symbol)))))
-
-(defmacro-public in-module-define-function
- (module-name function-name+arg-list . body)
- "Define a public function in a module:
- (in-module-define-function (some module) (function-name . args)
- ..body..)"
- `(in-module-define-variable
- ,module-name
- ,(car function-name+arg-list)
- (let ((proc (lambda ,(cdr function-name+arg-list)
- ,@body)))
- (set-procedure-property! proc
- 'name
- ',(car function-name+arg-list))
- proc)))
-
-;;; `define-markup-command' can be used both for built-in markup
-;;; definitions and user defined markups.
-(defmacro-public define-markup-command (command-and-args signature . body)