[slime-devel] Re: possible bug in SLIME/Lispworks

Bjørn Nordbø bn at telenor.net
Wed Mar 24 23:04:40 UTC 2004


Luke Gorrie wrote:
> Bjørn Nordbø <bn at telenor.net> writes:
> 
> > That is probably cool, but I wouldn't know as I have never used
> > the Lispworks GUI environment.
> 
> It's great! It turns simple multithreading bugs into denial-of-service
> attacks against your window manager..

Seems like something that could ruin a perfectly good day when
telecommuting with a 128 kbps uplink. :-)

By the way, I needed to use SLIME with a legacy app running on
Lispworks 4.1 today, and hacked in support for this version.  It
seems to be working ok, except for a lot of complaints about
redefining NO-APPLICABLE-METHOD on startup that I haven't figured
out yet.  Anyway, I have attached a patch if this is of any
interest.

And please tell me if this is the improper way of submitting a
patch, if its format is wrong, if I am missing something or
whatever; this my first patch in years. :-)

-- 
Lisp can accomodate a wide range of psychological problems.
-------------- next part --------------
Index: swank-lispworks.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-lispworks.lisp,v
retrieving revision 1.36
diff -u -r1.36 swank-lispworks.lisp
--- swank-lispworks.lisp	23 Mar 2004 21:29:14 -0000	1.36
+++ swank-lispworks.lisp	24 Mar 2004 22:53:13 -0000
@@ -37,7 +37,8 @@
 
 (defimplementation create-socket (host port)
   (multiple-value-bind (socket where errno)
-      (comm::create-tcp-socket-for-service port :address host)
+      #-lispworks4.1(comm::create-tcp-socket-for-service port :address host)
+      #+lispworks4.1(comm::create-tcp-socket-for-service port)
     (cond (socket socket)
           (t (error 'network-error 
               :format-control "~A failed: ~A (~D)"
@@ -59,8 +60,10 @@
 
 (defimplementation emacs-connected ()
   ;; Set SIGINT handler on Swank request handler thread.
-  #-win32 
+  #-(or win32 lispworks4.1)
   (sys:set-signal-handler +sigint+ (make-sigint-handler mp:*current-process*))
+  #+lispworks4.1
+  (sys::set-signal-handler +sigint+ (make-sigint-handler mp:*current-process*))
   (let ((lw:*handle-warn-on-redefinition* :warn))
     (defmethod env-internals:environment-display-notifier 
         (env &key restarts condition)
@@ -312,7 +315,7 @@
 (defun dspec-buffer-position (dspec offset)
   (etypecase dspec
     (cons (let ((name (dspec:dspec-primary-name dspec)))
-            (etypecase name
+            (typecase name
               ((or symbol string) 
                (list :function-name (string name)))
               (t (list :position offset)))))
@@ -386,10 +389,15 @@
   `(defimplementation ,name (name)
     (xref-results (,function name))))
 
-(defxref who-calls      hcl:who-calls)
+;;; only for lispworks 4.2 and above
+#-lispworks4.1
 (defxref who-references hcl:who-references)
+#-lispworks4.1
 (defxref who-binds      hcl:who-binds)
+#-lispworks4.1
 (defxref who-sets       hcl:who-sets)
+
+(defxref who-calls      hcl:who-calls)
 (defxref list-callees   hcl:calls-who)
 
 (defimplementation who-specializes (classname)


More information about the slime-devel mailing list