mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-26 03:42:03 -08:00
60 lines
3.7 KiB
HTML
60 lines
3.7 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Slime</title>
|
|
<meta charset="utf-8">
|
|
<link rel="stylesheet" href="style.css" type="text/css">
|
|
</head>
|
|
<body>
|
|
<div style="width: 600px; margin: 20px;">
|
|
<h2>Slime</h2>
|
|
<p>Requires <b>ECL threads</b>.</p>
|
|
<p>This should work with any Slime version that plays together with ECL.</p>
|
|
<br>
|
|
<h3>Prepare</h3>
|
|
<ul>
|
|
<li>Add to your <code>~/.emacs</code> file:
|
|
<pre>
|
|
(add-to-list 'load-path "~/slime/") ; slime path
|
|
(require 'slime)
|
|
(slime-setup '(slime-fancy))</pre>
|
|
<li>Add to your <code>~/.swank.lisp</code> file (or copy file <code>eql5/slime/.swank.lisp</code> in your home directory):
|
|
<br>(Please note: this isn't really optional -- you <b>need</b> to set this option for a useful Slime + EQL.)
|
|
<pre>(setf swank:*globally-redirect-io* t) ; show print output in Emacs</pre>
|
|
<li><p>Copy file <code>eql5/slime/eql-start-swank.lisp</code> in your <code>slime/</code> directory</p>
|
|
<li><i>Optionally:</i><br>In order to indent <code>qlet</code> correctly, edit your <code>slime/contrib/slime-cl-indent.el</code> file and add a line:
|
|
<pre>
|
|
(let* (as let)) ; already there
|
|
(qlet (as let)) ; new</pre>
|
|
<br>
|
|
</ul>
|
|
<h3>Run</h3>
|
|
<ul>
|
|
<li>Run the swank server (the command line option <code>-slime</code> can be omitted if the file name contains "start-swank"), optionally passing a Lisp file:
|
|
<pre>eql5 <path-to-slime>/eql-start-swank.lisp [file.lisp]</pre>
|
|
<li><b>Please note</b> (e.g. for MinGW): if you can't connect from Emacs to Slime, try to start swank detached from the console (final <b>&</b>):
|
|
<pre>eql5 <path-to-slime>/eql-start-swank.lisp [file.lisp] <b>&</b></pre>
|
|
<li>Run Emacs and do:
|
|
<code>Meta-X slime-connect</code> (please note: use <code>slime-connect</code>) and hit <code>Return</code> 2 times (confirming the default values).
|
|
<p>Please note: if <code>:dont-close</code> is set to <code>T</code> in <code>eql-start-swank.lisp</code>, quitting/restarting Emacs will not affect a running EQL program, that is: if you quit/restart Emacs, you can connect to the same swank/EQL you left when quitting Emacs.</p>
|
|
</ul>
|
|
<br>
|
|
<h3>Loading files</h3>
|
|
<p>You should <b>always</b> use <code>qload</code> instead of <code>load</code>, if the file contains any EQL code.</p>
|
|
<p>It's not strictly necessary in every case, but not doing so may result in slow loading (many thread switches, for each EQL function call), or may not even work (e.g. if the loaded code uses Qt threads internally).</p>
|
|
<br>
|
|
<h3>Help</h3>
|
|
<p>For help see the <code>qapropos</code>, <code>qfind-bound</code>, <code>qproperties</code> and <code>qgui</code> functions.</p>
|
|
<p>To kill the swank process (Slime), use function <code>qquit</code> / <code>qq</code> (since quitting Emacs will not kill it).</p>
|
|
<br>
|
|
<h3>Notes</h3>
|
|
<p>If you notice slow execution of a function called from the REPL, try to wrap it in <code>qrun</code>/<code>qrun*</code>, as this will reduce eventual, multiple thread switches (for each EQL function call) to a single one.</p>
|
|
<p>All EQL functions are wrapped in <code>qrun*</code> (see <code>eql5/slime/thread-safe.lisp</code>), so it's safe to call them either directly from the REPL or using 'eval region' (or from any other ECL thread).</p>
|
|
<p>If the Slime REPL hangs, you can simply try to connect again (losing the old connection): no need to restart Lisp.</p>
|
|
<p>This Slime mode is both convenient and simple to use, but conses a little more for every EQL function call.
|
|
<br>If you absolutely want direct EQL function calls, please see the less convenient <a href="Slime-REPL-hook.htm">Slime REPL Hook</a> mode.</p>
|
|
<hr>
|
|
<p><a href="EQL-Slime-Integration.htm">How does it work?</a>
|
|
</div>
|
|
</body>
|
|
</html>
|