<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Helmut Eller wrote:
<blockquote cite="mid:m2vdwvb7fx.fsf@common-lisp.net" type="cite">
  <pre wrap="">* Stas Boukarev [2008-09-16 01:35+0200] writes:

  </pre>
  <blockquote type="cite">
    <pre wrap="">I don't know what is better: use the previous connection or use the
connection if it is the only remained. The attached patch is doing the
former.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I added a customizable variable, slime-auto-select-connection.  The
default is to ask if the connection should be switched.  If you set the
variable to 'always the first connection will be used.
  </pre>
</blockquote>
<br>
I have this in my .emacs file. By pressing F12, I make the
default-connection a buffer-local variable. <br>
As I usualy have several differen lisps running at the same time, with
different lisp code.<br>
<br>
(defun slime-toggle-connection ()<br>
  "Change current slime connection, and make it buffer local"<br>
  (interactive)<br>
  (setf  slime-net-processes (rotate-list slime-net-processes))<br>
  (let ((p (car slime-net-processes)))<br>
    (make-local-variable 'slime-default-connection)<br>
    (slime-select-connection p)<br>
    (message "Lisp: %s, buffer: %s" (process-contact p)
(slime-connection-name p))))<br>
<br>
(define-key slime-mode-map [f12] 'slime-toggle-connection)<br>
(define-key slime-mode-map [f11] 'slime-goto-current-connection)<br>
<br>
<br>
<br>
<div class="moz-signature">-- <br>
<title>FreeCode Signature</title>
<meta http-equiv="Content-Type" content="text/html; ">
<style type="text/css">
            body {
                font-family: Helvetica, Verdana, "Tahoma MS", Arial, Sans-Serif;
                color: black;
                font-size: 11pt;
            }
            .name {
                color: #072669;
                font-weight: bold;
            }
            .pos {
                color: #cd071e;
                font-weight: bold;
            }
            .cat {
                color: #cd071e;
                font-size: 10pt;
                font-weight: normal;
            }
            .val {
                color: #072669;
                font-weight: normal;
            }
            .quote {
                color: gray;
                font-size: 9pt;
                font-weight: normal;
            }
        </style>
<span class="name">Free Software Consultant</span><br>
<span class="val">Cell:</span> <span class="val">+47 - 47 34 40 08</span><br>
<span class="val">Phone:</span> <span class="val">+47 - 21 53 69 00, </span><span
 class="val">Fax:</span> <span class="val">+47 - 21 53 69 09</span><br>
<span class="val">Addr:</span> <span class="val">Nydalsveien 30b, 0484
Oslo</span><br>
<a href="http://www.freecode.no/" style="text-decoration: none;"><img
 style="border: medium none ; padding: 7px 0px 0px;"
 src="cid:part1.06030809.07040709@telenor.com" alt="" height="56"
 width="370"></a><br>
<pre class="quote">
</pre>
</div>
</body>
</html>