Chapter 35. Extending CLISP

Table of Contents

35.1. Adding a built-in function
35.2. Adding a built-in variable
35.3. Recompilation

Common Lisp is a programmable programming language.

CLISP can be easily extended the same way any other Common Lisp implementation can: create a lisp file with your variables, functions, macros, etc.; (optionally) compile it with COMPILE-FILE; LOAD it into a running CLISP, and save the memory image.

This method does not work when you need to use some functionality not available in CLISP, e.g., you want to call a C function. You are urged to use External Modules instead of adding built-in functions.

Note

CLISP comes with an FFI which allows you to access C libraries in an easy way (including creating FFI:FOREIGN-FUNCTIONs dynamically).


These notes document CLISP version 2.41Last modified: 2006-10-13