mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-25 19:31:57 -08:00
58 lines
3.5 KiB
HTML
58 lines
3.5 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>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>If you experience slow loading of files (compared to direct loading), use <code>qload</code> instead of <code>load</code>, which will reduce all thread switches during the load process to a single one.</p>
|
|
<p>Another case where you need to use <code>qload</code> is when you use Qt classes which use threads internally (see e.g. <code>examples/X-extras/move-blocks.lisp</code>).</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>Please note that you need to manually <b>delete</b> the file <code>eql5/slime/thread-safe.fas*</code> after every upgrade of either ECL or EQL (it will then be compiled automatically next time you use Slime).</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>
|