GitHub - ecraven/mit-scheme-swank: Swank that works with current SLIME (original) (raw)

A version of Swank for MIT/GNU Scheme that works with current SLIME CVS.

Keywords: swank mit-scheme slime

Usage

Put (load-option 'format) (load "/path/to/new/swank.scm" (->environment '(runtime swank))) somewhere into your ~/.scheme.init.

Alternatively, replace runtime/swank.scm in your MIT/GNU Scheme source directory with this swank.scm before building it, but remove the last line (because (initialize-package!) is run automatically in that case).

Updates

The following fixes were applied to MIT/GNU Scheme swank.scm (git)

Startup Problems

Now we have a working SLIME REPL again.

Autodoc

Actually implement swank:autodoc. It is called with a list form that contains the special symbol swank::%cursor-marker% somewhere to show the position of the cursor. The new procedure FIND-STRING-BEFORE-SWANK-CURSOR-MARKER returns the symbol that starts the expression which contains the cursor as a string. The new procedure PROCEDURE-PARAMETERS returns a list containing the function name and the list of parameters (as printed by PA) if symbol is bound to a function. The new variable SWANK-EXTRA-DOCUMENTATION contains an (incomplete) list of “parameters” to special forms and macros.

Now we have working autodoc in the REPL and in Scheme buffers.

Completion

Trying to auto-complete in the REPL raises condition “Unbound variable: swank:completions”. It seems swank added swank:completions in addition (or instead of?) swank:simple-completions.

Directories

Added directory functions SWANK:DEFAULT-DIRECTORY and SWANK:SET-DEFAULT-DIRECTORY for slime commands ,!d ,cd ,+d ,-d ,change-directory ,push-directory ,pop-directory ,pushd ,popd ,pwd

Debugging

There are numerous problems, including no replies sent to messages and incorrect replies.

Describing

Adding basic support for SWANK:DESCRIBE-FUNCTION and SWANK:DESCRIBE-SYMBOL.

Apropos

The returned lists are formatted incorrectly (not Lisp proplists). Fixed this.

Compiling

The binding for compile-and-load is missing. Not implemented yet.

Presentations

Added support for “presentations”. Every result is clickable in Emacs, which recalls the value.

Buffering

Added buffering of output before sending to Emacs. Without this, SLIME is not usable for programs that write more than a few lines of output.

Debugging

Working on debugging, added redirection of input (as well as output) to Emacs, though this doesn’t work yet for restarts that need input (like USE-VALUE).