/[slime]/slime/swank-sbcl.lisp
ViewVC logotype

Diff of /slime/swank-sbcl.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.226 by heller, Fri Oct 17 21:27:24 2008 UTC revision 1.227 by heller, Thu Oct 30 09:28:51 2008 UTC
# Line 176  Line 176 
176      (setq *wait-for-input-called* t))      (setq *wait-for-input-called* t))
177    (let ((*wait-for-input-called* nil))    (let ((*wait-for-input-called* nil))
178      (loop      (loop
179       (let ((ready (remove-if-not #'listen streams)))       (let ((ready (remove-if (lambda (s)
180                                   (let ((c (read-char-no-hang s nil :eof)))
181                                     (case c
182                                       ((nil) t)
183                                       ((:eof) nil)
184                                       (t
185                                        (unread-char c s)
186                                        nil))))
187                                 streams)))
188         (when ready (return ready)))         (when ready (return ready)))
189       (when timeout (return nil))       (when timeout (return nil))
190       (when (check-slime-interrupts) (return :interrupt))       (when (check-slime-interrupts) (return :interrupt))
191       (when *wait-for-input-called* (return :interrupt))       (when *wait-for-input-called* (return :interrupt))
192       (let* ((f (constantly t))       (let* ((f (constantly t))
193              (handlers (loop for s in streams              (handlers (loop for s in streams
194                                do (assert (open-stream-p s))
195                              collect (add-one-shot-handler s f))))                              collect (add-one-shot-handler s f))))
196         (unwind-protect         (unwind-protect
197              (sb-sys:serve-event 0.2)              (sb-sys:serve-event 0.2)

Legend:
Removed from v.1.226  
changed lines
  Added in v.1.227

  ViewVC Help
Powered by ViewVC 1.1.5