Fix: off-by-one while fontifying REPL's output
[geiser.git] / HACKING
blobe357fd33880d1da39fac4138863faa6aaf6c71f3
1 ## How to support a new Scheme implementation
3 Geiser works by running an instance of a REPL, or remotely connecting
4 to one, and evaluating the scheme code it sees there. Then, everytime
5 it needs to perform some operation (like, say, printing autodoc,
6 jumping to a source location or expanding a macro), it asks the
7 running scheme instance for that information.
9 So supporting a new scheme usually means writing a small scheme
10 library that provides that information on demand, and then some
11 standard elisp functions that invoke the procedures in that
12 library.
14 To see what elisp functions one needs to implement, just execute the
15 command `M-x geiser-implementation-help` inside emacs with a recent
16 version of geiser installed. And then take a look at, say,
17 geiser-guile.el or geiser-racket.el for examples of how those
18 functions are implemented for concrete schemes (those are the most
19 featureful implementations we have, so perhaps it's easier to begin
20 with something like geiser-chicken.el or geiser-chibi.el).
22 Not all schemes can provide introspective information to implement all
23 the functionality that geiser tries to offer.  That is okay: you can
24 leave as many functions unimplemented as you see fit (there is even an
25 explicit list of unsupported features), and geiser will still know how
26 to use the ones that are implemented.