define-repl-commandStarting Upstartup-modulefuncall-in-packageGoTo Top

funcall-in-package   symbol package-name &rest args[Function]

Purpose
Apply a function to arguments when the package containing the function may not exist until execution time.

Package   :common-lisp-user (not exported)

Module   Defined in initiate.lisp (or in startup.lisp, if initiate.lisp is not used to initiate GBBopen)

Arguments and values

symbol     A symbol
package-name     A package name
args     Arguments to the function

Description
This function provides a convenient means of applying a function to arguments, when the package containing the function may not exist until execution time. The function to be applied is determined at runtime by using the name of symbol to find the symbol with the same name in package and using it as the function designator.

Example
Define a REPL command named :my-app that compiles and loads the module :my-app, sets the current package to the :gbbopen-user package, and then calls the function startup in the package :my-app-package that is defined when the :my-app module is loaded:

  (define-repl-command :my-app (&rest options)
    "Compile and load my GBBopen application module"
    (startup-module :my-app options :gbbopen-user)
    ;; Call the startup function:
    (funcall-in-package '#:startup :my-app-package))


The GBBopen Project


define-repl-commandStarting Upstartup-modulefuncall-in-packageGoTo Top