[slime-cvs] CVS update: slime/swank-gray.lisp

Helmut Eller heller at common-lisp.net
Wed Jan 19 18:28:38 UTC 2005


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv6785

Modified Files:
	swank-gray.lisp 
Log Message:
(stream-unread-char): If the char argument doesn't match the contents
in the buffer ignore it and emit a warning instead.
Date: Wed Jan 19 10:28:37 2005
Author: heller

Index: slime/swank-gray.lisp
diff -u slime/swank-gray.lisp:1.6 slime/swank-gray.lisp:1.7
--- slime/swank-gray.lisp:1.6	Sat Sep 18 23:11:14 2004
+++ slime/swank-gray.lisp	Wed Jan 19 10:28:37 2005
@@ -66,7 +66,12 @@
 
 (defmethod stream-unread-char ((s slime-input-stream) char)
   (with-slots (buffer index) s
-    (setf (aref buffer (decf index)) char))
+    (decf index)
+    (cond ((eql (aref buffer index) char)
+           (setf (aref buffer index) char))
+          (t
+           (warn "stream-unread-char: ignoring ~S (expected ~S)"
+                 char (aref buffer index)))))
   nil)
 
 (defmethod stream-clear-input ((s slime-input-stream))




More information about the slime-cvs mailing list