[slime-devel] Re: default connections

Knut Olav Bøhmer knut-olav.bohmer at telenor.com
Mon Sep 22 09:25:19 UTC 2008

Helmut Eller wrote:
> * Stas Boukarev [2008-09-16 01:35+0200] writes:
>> 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.
> 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.

I have this in my .emacs file. By pressing F12, I make the
default-connection a buffer-local variable.
As I usualy have several differen lisps running at the same time, with
different lisp code.

(defun slime-toggle-connection ()
  "Change current slime connection, and make it buffer local"
  (setf  slime-net-processes (rotate-list slime-net-processes))
  (let ((p (car slime-net-processes)))
    (make-local-variable 'slime-default-connection)
    (slime-select-connection p)
    (message "Lisp: %s, buffer: %s" (process-contact p)
(slime-connection-name p))))

(define-key slime-mode-map [f12] 'slime-toggle-connection)
(define-key slime-mode-map [f11] 'slime-goto-current-connection)

Free Software Consultant
Cell: +47 - 47 34 40 08
Phone: +47 - 21 53 69 00, Fax: +47 - 21 53 69 09
Addr: Nydalsveien 30b, 0484 Oslo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20080922/8b94e1c2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_horizontal.png
Type: image/png
Size: 7619 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20080922/8b94e1c2/attachment.png>

More information about the slime-devel mailing list