startup-moduleStarting Upwith-system-nameGoTo Top

with-system-name   (system-name) form* => result*[Macro]

Purpose
Associate system-name with REPL commands, directory definitions, and module definitions defined in forms.

Package   :common-lisp-user (also imported into and exported from :module-manager)

Module   Defined in extended-repl.lisp

Arguments and values

system-name     A keyword symbol identifying a system
form     A form
results     The values returned by evaluating the last form

Returns
The values returned by evaluating the last form.

See also
    define-relative-directory
    define-root-directory
    define-module
    define-repl-command

Examples
Define a REPL command named :my-app associated with system :my-app that compiles and loads the module :my-app and sets the current package to the :gbbopen-user package:

  (with-system-name (:my-app)
    (define-repl-command :my-app (&rest options)
      "Compile and load my GBBopen application module"
      (startup-module :my-app options :gbbopen-user)))

Now, show the commands associated with system :my-app:

  > :commands :my-app
  Command           Description
  -------           -----------
  :my-app           Compile and load my GBBopen application module
  >

Now, undefine all the commands, directories, and module definitions associated with system :my-app:

  > :undefine-system :my-app
  Really undefine commands, directories, & modules of :my-app?  y
  ;; System :my-app undefined.
  > :commands :my-app
  ;; System :my-app was not found.
  >

Notes
A developer will typically wrap the define-repl-command forms in an application's commands.lisp file with a single with-system-name macro and the definitions in the application's modules.lisp file with a second with-system-name macro.


The GBBopen Project


startup-moduleStarting Upwith-system-nameGoTo Top