summaryrefslogtreecommitdiff
path: root/HACKING
blob: e357fd33880d1da39fac4138863faa6aaf6c71f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## How to support a new Scheme implementation

Geiser works by running an instance of a REPL, or remotely connecting
to one, and evaluating the scheme code it sees there. Then, everytime
it needs to perform some operation (like, say, printing autodoc,
jumping to a source location or expanding a macro), it asks the
running scheme instance for that information.

So supporting a new scheme usually means writing a small scheme
library that provides that information on demand, and then some
standard elisp functions that invoke the procedures in that
library.

To see what elisp functions one needs to implement, just execute the
command `M-x geiser-implementation-help` inside emacs with a recent
version of geiser installed. And then take a look at, say,
geiser-guile.el or geiser-racket.el for examples of how those
functions are implemented for concrete schemes (those are the most
featureful implementations we have, so perhaps it's easier to begin
with something like geiser-chicken.el or geiser-chibi.el).

Not all schemes can provide introspective information to implement all
the functionality that geiser tries to offer.  That is okay: you can
leave as many functions unimplemented as you see fit (there is even an
explicit list of unsupported features), and geiser will still know how
to use the ones that are implemented.